[lfs-dev] Configuring vim and position of defaults.vim
zarniwhoop at ntlworld.com
Mon Mar 12 15:30:07 PDT 2018
On Mon, Mar 12, 2018 at 12:47:17PM -0500, Bruce Dubbs wrote:
> On 03/12/2018 12:19 PM, Ken Moffat wrote:
> > My experience is that the override does not work when the set comes
> > after the defaults have already been loaded in /etc/vimrc.
> Seems odd. If $VIMRUNTIME/defaults.vim is explicitly run, then the defaults
> *should* be set, but the skip_defaults_vim should then inhibit the defaults
> from being read again. The settings after reading defaults.vim should
> override the earlier settings.
I don't claim to understand the details, but when I searched a few
hours ago there were various posts about changed behaviour (not
> My understanding of the initialization process is to run:
> if ~/.vimrc exists
> run ~/.vimrc
> if skip_defaults_vim is not set
> run $VIMRUNTIME/defaults.vim
I think that with the /etc/vimrc currently in the book, defaults.vim
is always run.
I'll attach a specimen.xml file (one paragraph from the BLFS mutt
page). Using a copy, open it in vim, go to the second line and
insert a linefeed (i.e. just press the enter key) before
With the /etc/vimrc from the book, I find that both the start of the
second line, and the new third line, are inset. Moving the cursor
back, there is a tab at the start of each of these lines.
My reversal of the two lines in /etc/vimrc, or commenting both lines
there, fix this - I think that reversing the lines does what you
intended. But maybe running scriptnames might provide more info
(just found a reference to that in another search result).
Using the /etc/vimrc where I commented out the lines as you
requested, and with my own ~/.vimrc, if I run :scriptnames in a vim
session I get:
The elflord.vim line is because at the end of my /etc/vimrc I have
My point is that /etc/vimrc appears to be read before ~/.vimrc, not
just when ~/.vimrc is absent.
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 321 bytes
Desc: not available
More information about the lfs-dev