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>=&...


3

/usr/share/vim/vimrc is always sourced regardless of your vimrc (assuming $VIM doesn't point somewhere else - :h system-vimrc). The settings you're probably missing are in defaults.vim, a file that only gets sourced if you don't have a personal vimrc. To get them back add these two lines to your vimrc: unlet! skip_defaults_vim source $VIMRUNTIME/defaults....


3

From :h defaults.vim: If Vim is started normally and no user vimrc file is found, the $VIMRUTIME/defaults.vim script is loaded. Perhaps an empty vimrc is the same as no vimrc...? Anyways, try this... Near the start of $VIMRUNTIME/defaults.vim you'll see: if exists('skip_defaults_vim') finish endif So put something like this near the start of your ...


2

set fo-=r fo -=o *'formatoptions'* *'fo'* 'formatoptions' 'fo' string (default: "tcqj", Vi default: "vt") local to buffer This is a sequence of letters which describes how automatic formatting is to be done. See |fo-table|. When the 'paste' option is on, no formatting is done (like 'formatoptions' is empty). ...


2

I don't have a Linux machine with graphical interface here to test it, but I'd say the correct syntax for that line would be something like: set guifont=Ubuntu\ Mono\ 15


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 ...


1

I looked at the source and I don't see any user-facing way to disable the bell limit. You'd have to build your own version as you mentioned. Think twice about that, though... Rather than being a killjoy "feature" this apparently was implemented for the sake of Vim stability. I saw a couple comments indicating that rapid bell sequences can hang Vim. Here's ...


1

You must set showcmd to see this


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