set sw=4 cinoptions=:0.5sw,=0.5s
Indent this code as javascript:
switch (x) {
case 1:
foo();
case 2:
bar();
}
We expect to see the code indented as shown above (2 spaces used after switch
and 2 after case
). Instead, what results is
switch (x) {
case 1:
foo();
case 2:
bar();
}
this is because the function s:ParseCino(f)
in indent/javascript.vim
does not properly parse the :0.5s
from &cino
.
The indent/javascript.vim
file that is bundled with Vim is taken from the pangloss/vim-javascript
project to begin with, and that project already has an updated indent file that works properly
https://github.com/pangloss/vim-javascript/blob/master/indent/javascript.vim
9.0.1271
gvim, Debian 11
No response
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@bounceme - the version under "pangloss" indeed looks like it has a few improvements, but the header still has the same date. Can you update the header and send me the new version?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.