Vim auto indentation of lines without semicolons in Ruby

For some reason, in vim, whenever there is a line of ruby ​​code with a function that includes parentheses, for example: string = gets() without a semicolon, the next line is indented. When the semicolon, it works fine. Any ideas as to why this is happening and how to fix it? Also, since it is likely to be requested, here is my ~/.vimrc

+4
source share
1 answer

You probably don't want set cindent for ruby ​​files.

Use au FileType ruby setlocal nocindent

At the top (before any other au), for other languages ​​to work correctly, you need

instead of the corresponding lines.

+3
source

All Articles