User Location Vim.vimrc

I used Vim's bare bones under Ubuntu, and now I want to update the .vimrc file. Although Vim is indeed installed on my PC, I do not have a .vimrc file. I would like to add a .vimrc file, but it really should be under my ~ / .vim / folder (I like to save all my configurations in respected folders).

How to create a new vimrc file in this place in Ubuntu 13.04?

+4
source share
1 answer

Two options. (See :h vimrc for a default location and the -u option)

Create an alias vim -u ~/.vim/vimrc , this will force vim to use this vimrc instead of ~/.vimrc

or

Transition to vim 7.4. One of its default vimrc locations is ~/.vim/vimrc


You can also simulate vimrc elsewhere.

Create a ~ / .vimrc file containing

 runtime vimrc 

The task is to upload the first file named vimrc to your execution path. Which should be ~/.vim/vimrc

Or

You could simply symbolize ~ / .vim / vimrc in ~ / .vimrc

 ln -s $HOME/.vim/vimrc $HOME/.vimrc 

(I heard that some people had problems with this, but I don’t know yet)

+10
source

Source: https://habr.com/ru/post/1499248/


All Articles