Here's the basic autocmd I'm using now, that will have to suffice if there isn't a "right way":
au BufEnter * setlocal fo-=r
Seems to work well enough.
Question
I have found via :verbose set fo
that
formatoptions=a1njwcroql
Last set from /usr/local/share/vim/vim74/ftplugin/vim.vim
This is helpful but I obviously can't touch that file.
So, rather than using the unsavory hammer autocmd
, I am to do something in ~/.vim/after/ftplugin/
as noted here.
However I want my adjustment to apply across all filetypes unless I specify otherwise. There is no way in hell I'm going to generate one ~/.vim/after/ftplugin/*.vim
for each language and maintain that, that is far worse than the autocmd.
So hopefully there is something really basic I am missing that I can use to override Vim's default ftplugin overrides, namely, where I can run :set fo-=r
where it will actually do something, because doing it in the ~/.vimrc
does not work (the Vim default ftplugin overrides it (inconsistently between languages, I might add).
To clarify:
formatoptions
to a reasonable default that I decided upon ahead of time, this happens to be caq1njw
setlocal fo-=t fo+=croql
in $VIMRUNTIME/ftplugin/vim.vim
$VIMRUNTIME/ftplugin/vim.vim
's override further, with the statement setlocal fo-=r
(not using an autocmd, I know how to do that).No correct solution
OTHER TIPS
Here's the basic autocmd I'm using now, that will have to suffice if there isn't a "right way":
au BufEnter * setlocal fo-=r
Seems to work well enough.