* Tobiah <
to...@tobiah.org> [190910 03:01]:
I don't know if this is your problem, but a somewhat (but not too)
recent change to Vim added a file /usr/share/vim/vim##/defaults.vim that
gets sourced automatically by vim if no user vimrc file is found. This
file sets some very subjective non-default values, and I find some of
its choices highly obnoxious.
If this is your problem, there are two possible fixes. The first
(assuming the Debian packaging; I'm not sure if Ubuntu uses the Debian
package unchanged or not) is to edit /etc/vim/vimrc and uncomment the
line:
" let g:skip_defaults_vim = 1
The second is to ensure that the user has a vimrc file:
mkdir ~/.vim
touch ~/.vim/vimrc
My opinion is that the defaults.vim file should only set options that
almost all vim users will want, and should stay completely away from
options that are "personal taste" (i.e. leave them with the vim internal
default settings). The most noticeable option that bothers me is the
scrolloff setting. Some people like it, and some, like me, are bothered
by having it non-zero. The vim default has been 0 (the vi compatible
behavior) since the beginning of time^Wvim. A non-zero value was added
to defaults.vim, I suppose when vim started conditionally sourcing that
file. To repeat myself, defaults.vim should not set any options where
there is a wide variety of personal preference.
Quite honestly, I don't understand why this feechur was added at all; it
means that vim has one set of defaults if the user has a vimrc file and
a completely different set of "defaults" (really?) if the user doesn't
have his own vimrc file. This complicates vim startup, and adds one
more thing a new vim user needs to learn immediately when starting to
personalize vim by creating a ~/.vim/vimrc file: Install vim and start
using it; decide to create a vimrc just to change one or two options (or
maybe not to change any option but to add a key mapping); now vim
behaves quite differently, and the new user has to figure out why and
how to get all the "original" behavior back.
...Marvin