8

Is there any advantages or side-effects of an explicit set nocompatible that I'm perhaps missing? Actually, there are many side-effects. Every time compatible is set or reset Vim rescans all options (except "terminal") and switches defaults when necessary. After that it rebuilds quite a few internal tables for iskeyword, spelling, vartabs etc. (see ...


6

One reason you might want to include a guarded set nocompatible in your .vimrc is that compatible will not be automatically unset if you specify the vimrc with the -u flag: Using the "-u" argument with another argument than DEFAULTS has the side effect that the 'compatible' option will be on by default. It's for this reason that I have this version* in ...


4

Add these two lines to the top of your newly created .vimrc: unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim For details, see :help defaults.vim: If Vim is started normally and no user vimrc file is found, the $VIMRUNTIME/defaults.vim script is loaded. This will set 'compatible' off, switch on syntax highlighting and a few more things. See ...


3

There are too(?) many ways to do this. 1) :mkexrc :mkexrc [file] writes all mappings and changed options to a file (.exrc by default) 2) Option window :options opens a buffer with extra UI to change options (the code is in $VIMRUNTIME/optwin.vim); of course, the buffer is accessible by standard Vim commands too 3) Expression register i<C-R>=&...


2

This bug was introduced on the Vim runtime update of May 12, 2020, with the update of syntax/sh.vim from version 189 to version 190 from April 14, 2020, which updated the shDoubleQuoted rule to include the part in bold below: syn region shDoubleQuote matchgroup=shQuote start=+"+ matchgroup=shSpecial skip=+\\"+ end=+"+ contained contains=@...


1

The lines that restores your settings are autocmd BufWinLeave . mkview autocmd BufWinEnter . silent loadview They respectively save and load your settings for any file you open. From the doc (:h mkview) :mkvie[w][!] [file] Write a Vim script that restores the contents of the current window. When [!] is included an ...


Only top voted, non community-wiki answers of a minimum length are eligible