sponsor Vim development Vim logo Vim Book Ad

lua.vim : better Lua indent file

 script karma  Rating 27/16, Downloaded by 3724  Comments, bugs, improvements  Vim wiki

created by
Raymond Ko
 
script type
indent
 
description
This is a hastily hacked on version of the lua.vim indent file that ships with Vim. It auto-indents much better than the default one, especially when you have function arguments that span multiple lines inside of conditionals or just a function's multi-line argument list itself.

For an example of what it can accomplish, go here:
https://gist.github.com/4208232

GitHub:
https://github.com/raymond-w-ko/vim-lua-indent
 
install details
Copy the lua.vim file into the indent/ directory of your $HOME/.vim/ or $HOME/vimfiles/
If it doesn't exist, then create an indent/ directory. This lua.vim will override the default one installed along with Vim.
Alternatively, just use something like vim-pathogen.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
lua.vim 0.3 2015-08-15 7.0 Raymond Ko Fix many more indenting cases.
lua.vim 0.2.1 2013-04-11 7.0 Raymond Ko Fix a bug where the indent script tries to balance parentheses in comments, leading huge amounts of leading whitespace if the previous line has an open left parentheses.
lua.vim 0.2 2012-12-06 7.0 Raymond Ko add "elseif" and "else" to indentkeys so that it correctly auto-indents while in insert mode.
lua.vim 0.1 2012-12-04 7.0 Raymond Ko Initial upload
ip used for rating: 18.97.14.85

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github