janus
janus copied to clipboard
Javascript indentation of multi-line var definitions
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?
Perhaps related to pangloss/vim-javascript#161 I general, I tend to wait for upstream unless a known workaround can be applied.