By default, vim indents multi-line function calls in R in the following strange way:
There are two issues with this style:
- It steals horizontal space, so if some of the arguments are themselves complex expressions, the lines will quickly become too long.
- If you rename
some_functionor change it to a different function, the whole block needs to be re-aligned.
A saner indentation is
where the indentation amount is small and fixed (say, two spaces).
To make vim indent R code this way, add to your
let r_indent_align_args = 0
For more information, see