I can't seem to get the formatoptions
to work in the general case for vim.
I have filetype plugin on
and in many of the default plugins there's a line saying setlocal fo-=t fo+=croql
and after reading the vim docs I saw that was where the automatic insertion of the comment leader was coming from. I liked this, but it wasn't happening in python, (because the formatoption line wasn't in the default plugin) so I put the line (except with set fo+=crotl
) in my .vimrc
.
It doesn't seem to have done anything, the comment leader is still not inserted in python (or bash which also doesn't have the line in the default plugin).
I've also tried putting the line in my .vim/after/ftplugin/python.vim
file (both as setlocal
and set
, and it hasn't done anything there either.
My question is - are there any options that will override this action that I should look out for? else, what could be the reason it's not working?
Thanks in advance
EDIT:
I should note also: in the python buffers :set formatoptions?
shows that the options have been set, they just don't work.