janus icon indicating copy to clipboard operation
janus copied to clipboard

Javascript indentation of multi-line var definitions

Open DestyNova opened this issue 9 years ago • 1 comments

In multi-line var definition blocks, the second and subsequent lines look better if they line up with the variable name, rather than the "var" keyword.

Currently, they indent like this:

var a = 1,
b = 2,
c = 3;

Which is not intuitive... this would be better:

var a = 1,
    b = 2,
    c = 3;

There is another vim plugin which does this -- https://github.com/jiangmiao/simple-javascript-indenter -- although it tends to over-indent some other stuff. Would it be possible to modify the JS indenter used by Janus to handle var blocks better?

DestyNova avatar Mar 11 '15 12:03 DestyNova

Perhaps related to pangloss/vim-javascript#161 I general, I tend to wait for upstream unless a known workaround can be applied.

kalbasit avatar Apr 04 '15 16:04 kalbasit