Skip to main content
7 events
when toggle format what by license comment
Apr 27, 2020 at 19:22 comment added Karl Wilbur It absolutely does, and it absolutely works. I was having the exact same problem as the OP after upgrading to Ubuntu 20.04. My solution "fixed" it, in that it loaded my ~/.vimrc after the other plugins were loaded, thus allowing my ~/.vimrc to override the defaults, as intended.
Apr 27, 2020 at 19:19 comment added filbranden In any case... Your answer is not totally clear on what you're trying to accomplish here. I can see (now?) that you're trying to load vimrc last in the startup process, after all plug-ins. Your answer doesn't really state that, it would help if you started by explaining that... Also, while strace is nice and all, answering "which directory is last" is pretty easy, just looking at :set rtp? you'll see that ~/.vim/after is last. But, as mentioned before, this doesn't really work since fo will be reset by ft plugins and that's really the issue here.
Apr 27, 2020 at 19:14 comment added filbranden 1) Your (whole) vimrc is not really supposed to run on the context of a plugin. 2) Something like adding a one-line ~/.vim/after/plugin/formatoptions.vim with set fo-=o is more palatable... But that still doesn't work when a filetype plug-in overrides that. For example, open Vim (with no file, or an unrelated file), then use :e to open or create a *.vim file. You'll see that formatoptions has o in it again, since that's being set for that buffer by ftplugin/vim.vim and your after/plugin file won't be able to override it.
Apr 27, 2020 at 19:08 comment added Karl Wilbur Because it actually gets vim to honor the options in the .vimrc file. Please re-read, and make sure that you understand, both the question and the my answer.
Apr 27, 2020 at 11:19 comment added filbranden Sorry, but I fail to see how this is an answer to this question. Can you please clarify and explain why this will solve the problem with formatoptions?
Apr 27, 2020 at 7:48 review First posts
Apr 27, 2020 at 11:19
Apr 27, 2020 at 7:47 history answered Karl Wilbur CC BY-SA 4.0