[lfs-dev] Configuring vim and position of defaults.vim
bruce.dubbs at gmail.com
Mon Mar 12 09:40:19 PDT 2018
On 03/12/2018 10:57 AM, Ken Moffat wrote:
> TL;DR - I think 'let skip_defaults_vim=1' should come BEFORE
> 'source $VIMRUNTIME/defaults.vim' in /etc/vimrc.
> Some weeks ago I complained about the change in vim's behaviour
> (dropping back to previous position in a file), which turned out to
> be caused by the inclusion of defaults.vim.
> I thought I had a workaround, but in the end it didn't work so I
> thought I would have to get used to it. Meanwhile, I think it was
> Thomas who said he liked this behaviour.
> After much grumbling in my own file edits, today I rearranged some
> explanatorr text in a BLFS xml file (break a command explanation by
> inserting a newline) - the new line was severely indented, so I
> started to backspace, and then near the beginning of the line the
> backspace suddenly skipped back 8 spaces, i.e. it seemed to have
> inserted a tab there.
> So, I tried skipping the defaults in my own ~/.vimrc, and logging
> out. In the end I concluded that had not helped. Searching around,
> I eventually came upon
> The last comment, from 'user brammool' seemed relevant (to a
> question: If I like the defaults, but don't want them to overwrite
> my system settings, the workaround is to source defaults.vim in the
> system vimrc file, add the (few) settings I need and end with setting
> "skip_defaults_vim"?) -
> Loading defaults.vim first does not allow for disabling that, that's
> a catch 22.
> So, I tried changing my own /etc/vimrc to start:
> " Begin /etc/vimrc
> let skip_defaults_vim=1
> source $VIMRUNTIME/defaults.vim
> set nocompatible
> And that now seems to have restored the old behaviour, both when
> editing that command explanation, and when making my own local git
Hmm. What I interpret from your experience is that "defaults_vim" are
different from $VIMRUNTIME/defaults.vim.
What is your experience if you have both /etc/vimrc and ~/.vimrc, and
comment out both the source $VIMRUNTIME/defaults.vim line and the
What I had in mind with the current setup is that the upstream default
settings would be invoked and then the user could override them if desired.
More information about the lfs-dev