For some reason Vim thinks all of my comments should have all indentation removed. If I add #
to the beginning of a line, suddenly all leading whitespace is removed. How can I stop this?
I have Janus and NERDtree installed, in case it's relevent, along with copious other personal configurations in my .vimrc
, but none that (as far as I know) would cause such behavior.
Best Answer
I'm never satisfied with the "set all these things just in case" answers. I insist on knowing which of those things were set wrong and how they got set. Here is a command that will show you the values of all the relevant settings mentioned here, as well as where they were last set. If no
Last set from
line follows, it is a default value. No point in re-set
ting correct default values.See: http://vimdoc.sourceforge.net/htmldoc/options.html#:set-verbose
All I had to do to get that working was remove
set smartindent
from a plugin and add to my~/.vim/vimrc
: