Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indent closing brackets/parens after commas more sensibly #22

Open
hcs42 opened this issue Dec 13, 2013 · 0 comments
Open

Indent closing brackets/parens after commas more sensibly #22

hcs42 opened this issue Dec 13, 2013 · 0 comments

Comments

@hcs42
Copy link
Member

hcs42 commented Dec 13, 2013

Consider having a list:

[some_long_name,
 some_other_long_name]

The easiest way to add a third element is by moving over the ] character, pressing i, typing a comma and then enter. After the auto-indentation, the code will look like this:

[some_long_name,
 some_other_long_name,
]

It would be more convenient to have this:

[some_long_name,
 some_other_long_name,
 ]

We cannot just say that from now on we align the ] with the beginning of the previous line, because that would mean having incorrect indentations like this one:

[some_long_name,
 some_other_long_name
 ]

The proposal is that when indenting ], we should examine the previous token, and if it is a comma, we could indent the ] line as if it started with e.g. an atom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant