As suggested and report by David (thanks!) in issue 280
https://code.google.com/p/vim/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=280
this patch fixes the bad indenting of lua lines containing words that start
with "end".
diff -r 9dff716fb9aa runtime/indent/lua.vim
--- a/runtime/indent/lua.vim Thu Nov 06 10:03:01 2014 +0100
+++ b/runtime/indent/lua.vim Mon Nov 10 17:38:13 2014 +0000
@@ -54,7 +54,7 @@
" Subtract a 'shiftwidth' on end, else (and elseif), until and '}'
" This is the part that requires 'indentkeys'.
- let midx = match(getline(v:lnum), '^\s*\%(end\|else\|until\|}\)')
+ let midx = match(getline(v:lnum),
'^\s*\%(end\>\|else\>\|elseif\>\|until\>\|}\)')
if midx != -1 && synIDattr(synID(v:lnum, midx + 1, 1), "name") !=
"luaComment"
let ind = ind - &shiftwidth
endif
Julien Cornebise | Senior Research Scientist | Google DeepMind |
[email protected]
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.