diff options
author | Robert Andrew Ditthardt <Drew.Ditthardt@gmail.com> | 2015-12-12 17:07:25 -0800 |
---|---|---|
committer | Robert Andrew Ditthardt <Drew.Ditthardt@gmail.com> | 2015-12-12 17:07:25 -0800 |
commit | 291a43e1ddbf012d81ba49cec8d8e30aa0e49e98 (patch) | |
tree | 14523f70c712623a1684aac1cbe03cfdab6e872b | |
parent | cc203e4b93d920cb749f80336504d7e6df0081a2 (diff) | |
download | rneovim-291a43e1ddbf012d81ba49cec8d8e30aa0e49e98.tar.gz rneovim-291a43e1ddbf012d81ba49cec8d8e30aa0e49e98.tar.bz2 rneovim-291a43e1ddbf012d81ba49cec8d8e30aa0e49e98.zip |
Fix indenting nested elseifs
Currently,
```
if bool then
--stuff
elseif bool2 then
--morestuff
elseif bool3 then
--more stuff
else
--fail
end
```
Would get indented out strangely when using =. Now it behaves correctly.
-rw-r--r-- | runtime/indent/lua.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/indent/lua.vim b/runtime/indent/lua.vim index 5f049d4585..393994c590 100644 --- a/runtime/indent/lua.vim +++ b/runtime/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 |