开发者

vim auto indenting lines without semicolons in Ruby

开发者 https://www.devze.com 2023-01-20 03:57 出处:网络
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 semicolo

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

精彩评论

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