vim auto indenting lines without semicolons in Ruby
For some reason, in vim whenever there is a line of ruby code with a function including parentheses, eg: string = gets()
without a semicolon the next line is indented a level. When there is a semicolon, it works fine. Any ideas as to why this is happening a开发者_StackOverflow中文版nd how to fix it? Also, since it will probably be requested, here is my ~/.vimrc
You probably don't want set cindent
on ruby files.
Use au FileType ruby setlocal nocindent
At the top (before any other au's) for other languages to work properly you need
instead of their respective lines.
精彩评论