You are not logged in.

#1 2016-08-26 16:57:55

kinghajj
Member
Registered: 2008-07-15
Posts: 35

[RESOLVED] Creating an empty ~/.vimrc resets all default settings

Yesterday I created a fresh Arch installation from 2016.08, and noticed some peculiar behavior. Out-of-the-box, vim had a number of defaults changed: syntax highlighting, expanding tabs, autoindent, etc. After just creating a ~/.vimrc--even with no content--all of those are lost, and vim reverts to its standard settings: no highlighting, hard tabs, etc. Is this intended behavior? I tried adding "source /etc/vimrc" to the top, but that didn't help.

Last edited by kinghajj (2016-08-26 18:20:07)

Offline

#2 2016-08-26 17:31:04

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [RESOLVED] Creating an empty ~/.vimrc resets all default settings

It's due to /usr/share/vim/vim74/defaults.vim

" This is loaded if no vimrc file was found.

(/etc/vimrc doesn't count apparently)

I haven't run vim without a .vimrc for a long time so I don't know if it's the content of defaults.vim or the fact that it gets sourced that's new.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2016-08-26 17:43:43

kinghajj
Member
Registered: 2008-07-15
Posts: 35

Re: [RESOLVED] Creating an empty ~/.vimrc resets all default settings

Thanks! Adding "source $VIMRUNTIME/defaults.vim" to the top of my ~/.vimrc did the trick.

Offline

Board footer

Powered by FluxBB