开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜