vi - How to turn off autoindent -
i cannot seem turn off autoindent in vi. seems limited comment character #
if begin new line spaces , # following lines begin same, though dont want that.
behavior not reproduced if begin new line spaces or tabs.
have following set
noautoindent nocindent nosmartindent nocopyindent
not sure whether matters nocindent following set too
nocindent comments=:#
after spending time on this, able come solution (actually, two).
turns out formatoptions getting set "croql" reason, when opened file. solution disable "r" option. can find more details on "r" option here http://vimdoc.sourceforge.net/htmldoc/change.html#fo-table
solution 1
:set formatoptions-=r
the short form work
:set fo-=r
solution 2
:set fo=tcql
to confirm changes in place, use following command
:set fo
option "r" should not present.
Comments
Post a Comment