Automatic insertion of comment leader not working vim -
i can't seem formatoptions work in general case vim.
i have filetype plugin on , in many of default plugins there's line saying setlocal fo-=t fo+=croql , after reading vim docs saw automatic insertion of comment leader coming from. liked this, wasn't happening in python, (because formatoption line wasn't in default plugin) put line (except set fo+=crotl) in .vimrc.
it doesn't seem have done anything, comment leader still not inserted in python (or bash doesn't have line in default plugin). i've tried putting line in .vim/after/ftplugin/python.vim file (both setlocal , set, , hasn't done there either.
my question - there options override action should out for? else, reason it's not working?
thanks in advance
edit:
i should note also: in python buffers :set formatoptions? shows options have been set, don't work.
i found out - options working, comments set with
set comments=...,b:#,... and after looking up, found 'b' means vim counts line comment if there whitespace after #, wasn't putting space there, vim didn't count comment , hence didn't apply formatoptions set comments.
Comments
Post a Comment