bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16182:


From: Dmitry Gutov
Subject: bug#16182:
Date: Thu, 19 Dec 2013 06:48:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Adam Sokolnicki <adam.sokolnicki@gmail.com> writes:

> Personally I like the alignment to the beginning of the statement
> rather to the open paren.

Let's count this as +1.

> When I'm breaking line on argument list it's
> because the line is too long. With indentation to the opened paren the
> line stays long despite breaking the line.

Like Stefan suggests, if the opened paren is immediately followed by a
newline, the arguments will be indented less (but still indented by
additional two columns, compared to the beginning of the statement).

> I think this is how vim indents ruby code by default.

If that's true, could you point to:

* Some other open source project or two using this style.

* Some tutorial or step-by-step instruction for me to test this
  indentation in Vim. Do I need to install anything apart from the base
  distribution?
  Suppose I have the snippet of code typed out. What do I press next?

> I you ask me emacs can only support the indentation to the beginning
> of the statement.

I don't think it's sufficient, by itself.

Take this example:

current_user.statuses.find(params[:id]).update({
  user: current_user,
  text: params[:status]
})

Suppose `update' accepted a second argument, and we wanted to pass it
here, on the next line after the hash. Which column would it be indented
to? 0?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]