Hi,
I've patched the lua.vim indent plugin to fix the indentation problem with
"elseif" keyword when I used = operation.
By this patch, observed indentation like:
if foo then
bar
elseif foofoo then
barbar
endif
will be indented correctly:
if foo then
bar
elseif foofoo then
barbar
endif
Regards.
Akira Sekiya
diff --git a/indent/lua.vim.orig b/indent/lua.vim
--- a/indent/lua.vim.orig
+++ b/indent/lua.vim
@@ -54,7 +54,7 @@ function! GetLuaIndent()
" 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
--
--
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.