I'm using filetype indent on
in my vimrc, generally this works very well, when pressing return it sets the indentation properly (in most cases).
However it has a very strange/annoying behavior, of re-indenting a line, when editing some text to that line.
eg, editing a CMakeLists.txt
, typing endif(
will re-indent the the line based on vims indentation logic (in other cases too, this is just an example).
Is there a way to enable filetype indent
when adding in new-lines, but not have it attempt to re-indent existing text while typing?
filetype indent
, the settings offo
(formatoption) modifies vims indent behaviour. I would check the settings with:set fo?