JuliaEditorSupport / julia-vim

Vim support for Julia.
http://julialang.org/
Other
747 stars 93 forks source link

Avoid "aligned" indentations #285

Open goerz opened 2 years ago

goerz commented 2 years ago

Using the current master of julia-vim (no other plugins/configuration), I get the following indent behavior:

problem = ControlProblem(
                         X

where X marks the position of the cursor after hitting Enter after the first line.

That is, the indent plugin aligns the indentation with the opening bracket. This is not a style of indentation I wish to use, and not one that is recommended by any of the styles supported by JuliaFormatter. Instead, I'd like to have the second line indented with 4 spaces.

Is there any way to tweak the plugin to achieve this?

goerz commented 2 years ago

Ah, I found that

let g:julia_indent_align_brackets = 0

solves this.

Two comments:

Feel free to close this issue, unless you want to keep it open for the above two comments

goerz commented 2 years ago

Of course, the README actually says that it's incomplete, but I missed that part, skimming through ;-)