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 ...
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 ...
Add these two lines to the top of your newly created .vimrc:
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 ...
There are too(?) many ways to do this.
writes all mappings and changed options to a file (.exrc by default)
2) Option window
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
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=@...
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)
Write a Vim script that restores the contents of the
When [!] is included an ...