My OS is Debian, with LXDE.
find / -name '*vimrc'
/usr/share/vim/vimrc
/etc/vim/vimrc
What is the difference between these two vimrc? Which one controls my vim?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityI want to know What is the difference between two vimrc?
In the Debian packaged version of vim, /usr/share/vim/vimrc
is a symlink to /etc/vim/vimrc
- i.e., they are the same file.
% ls -al /usr/share/vim/vimrc
lrwxrwxrwx 1 root root 14 Dec 27 16:26 /usr/share/vim/vimrc -> /etc/vim/vimrc
If you want to know information about a file alway at least look inside it, e.g. the first few lines of comments give some explanation.
% head -5 /etc/vim/vimrc
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
" the call to :runtime you can find below. If you wish to change any of those
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
This is a system wide vimrc file, I believe it is run everytime vim is launched and for every user on the system.
If you want to make custom changes to vim, you should do it in your $HOME/.vimrc
file.
:help
and read along.:help vimrc
:-)