0

In my .vimrc I have explicitly written the following:

set nowrap
set nospell
set foldcolumn=0

However, none of these seem to work by default and I always end up having to type the commands manually after startup. Could this be a file type issue / might it be the case that I have some plugins that override what I set in .vimrc?

EDIT

Actually if I strip my .vimrc down to just the three lines above, everything works out fine. It turned out that what's messing my wrapping and spelling is the vim-pandoc plugin. This is the minimal .vimrc file needed to reproduce

"VUNDLE##################################################
set nocompatible              " be iMproved, required
filetype off                  " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'vim-pandoc/vim-pandoc'


" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
"##########################################################

set foldcolumn=0
set nospell
set nowrap
  • yes, have a look here vim.wikia.com/wiki/Debug_unexpected_option_settings. It is most likely your filetype plugin, so have a look at that. Possible Solution are in like 100 post here: vi.stackexchange.com/questions/13537/… and here: vi.stackexchange.com/questions/8382/… for example – Doktor OSwaldo Oct 24 '17 at 6:19
  • What's the output of :verbose set wrap? after startup? – Rich Oct 24 '17 at 8:37
  • @Rich the output is "wrap". Anyhow, Doktor OSwaldo is right - it really seems like this question has been answered before and I'd better look at the solutions already presented – jharme Oct 24 '17 at 9:09
  • 1
    @jharme That output suggests the problem is not that a filetype plugin is overwriting the value (because if that were the case the output would include the location of the file that is overwriting the value). Is that the entire contents of your .vimrc file? What operating system are you running Vim in? – Rich Oct 24 '17 at 11:36
  • @Rich Thanks for the remark about the entire contents. I edited the question to include a minimal .vimrc needed to reproduce. So, to me it seems to be a ftplugin issue after all? – jharme Oct 26 '17 at 5:01
0

As stated in the edit above my problem was caused by the vim-pandoc plugin. Fix number 2 presented by Doktor OSwaldo for this question solves this for me:

autocmd FileType pandoc setlocal nowrap
autocmd FileType pandoc setlocal nospell
autocmd FileType pandoc setlocal foldcolumn=0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.