I have included filetype pluginrails vim for some plugins that I added, but a side effect of this is that now auto-comment is turned on in all types of files (for example, if I start a line with #, the next line, either Enterin insert mode, or Oetc., to enter insert mode, also get #).
I found a guide to turn off automatic commenting formatoptionsand added the following to my .vimrc:
au FileType * setlocal formatoptions-=cro
However, I still run into problems - unless I explicitly :source .vimrc(or type setlocal ...directly), it does not take effect. I decided that it was because vim ftplugins override my options with their own.
Then I found a second guide that talks about using a post-ftplugin script to make changes after running ftplugin scripts, however their solution is to create symbolic links for each file in ~ / .vim / after / ftplugin in the central file, and that seems to me cloned.
Is there a way to create a generic script after ftplugin or am I approaching this issue incorrectly? Any help would be appreciated.
source
share