On 03/12/2018 05:30 PM, Ken Moffat wrote:
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
if skip_defaults_vim is not set
I think that with the /etc/vimrc currently in the book, defaults.vim
is always run.
That is correct because we run it explicitly.
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.
I agree that it irritating. If you set 'expandtab' then they are spaces
and not true tab characters, but is is still irritating.
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.
Right. At least my understanding is that /etc/vimrc is always read if
it is present.
Looking at the options for vim:
-u <vimrc> Use <vimrc> instead of any .vimrc
help says: "vim -u NORC" can be used to skip these initializations
without reading a file.
I'll note that the vim reference manual sections 4 and 5 (Initialization
and $VIM and $VIMRUNTIME) are quite long and complex.
Unsubscribe: See the above information page