I have used the bare bones of Vim under Ubuntu and now I would like to update my .vimrc file. Although Vim is indeed installed on my PC I don't seem to have a .vimrc file. I would like to add my .vimrc file but it really should go under my ~/.vim/ folder (I like to keep all my configurations in their respected folders).
How does one create a new vimrc file under this location in Ubuntu 13.04?
Two options. (Take a look at :h vimrc
which describes the default location and the -u option)
Create an alias to vim -u ~/.vim/vimrc
this will cause vim to use that vimrc instead of ~/.vimrc
Or
Upgrade to vim 7.4. One of its default vimrc locations is ~/.vim/vimrc
You can also simulate the vimrc being in a different place.
Create a ~/.vimrc file that contains
runtime vimrc
It's job is to load the first file named vimrc in your runtime path. Which should be ~/.vim/vimrc
Or
You could just symlink ~/.vim/vimrc to ~/.vimrc
ln -s $HOME/.vim/vimrc $HOME/.vimrc
(I've heard some people have had problems with this but I haven't so far)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With