So I wanted to set up my new PC and vim was one of the first things.
I need my .vim directory for that. I have vim and it works, too.
I found the indent folder at /usr/share/vim/vim90/indent
. This seems to be the correct folder but I have no idea if this is the correct location. The .vimrc i created at ~/.vimrc.
There are as far as I could find two possible "proper" places for .vim, which is ~/.vim and /etc/vim. It is in neither.
What should be the next step to properly use vim? Should I leave it there? Should I create .vim in my home dir and move it there? Does it literally not matter and I am confusing over nothing?
Thanks for any help!
CodePudding user response:
/usr/share/vim/vim90/
is the system-wide "runtime directory". What is in there shouldn't be messed with because…
- it needs to be in a certain state for Vim to work as expected,
- whatever you do there might be overridden or left behind during later upgrade,
- other users might be negatively impacted by your changes.
The first reason is sad, but yeah, Vim is a fragile beast, the working of which can be compromised very easily by moving stuff around, renaming files or whatnot.
The second reason is, I think, easy to demonstrate: when 9.1 is released, it will ignore /usr/share/vim/vim90/
entirely, and thus whatever changes you might have done there.
The third reason might seem more abstract because you are probably the only actual person to use that particular computer, but Unix-like systems are multi-user by design and, in that context, keeping your changes in your own $HOME
is just common sense.
Vim is highly configurable and offers many ways to craft the perfect personal environment… or shoot yourself in the foot so, for now, you should do your configuration in your own $HOME
as it is simple and predictable:
- create a
.vim
directory under$HOME
,$HOME/.vim
, - create a
.vimrc
file under$HOME
,$HOME/.vimrc
,
and forget that /usr/share/vim/vim90/
ever existed.