What is the problem with vim -u / path_to / vimrc?

I use the user with other people.
Each has created a directory in the home directory, and everyone works in its "own" directory.
I want to use my customization when I use vim, and I don't want to disturb others with my preferences.

I created a .vimrc file in $ HOME / my_directory

I defined an alias my_vim="vim -u /full_path_to_home/my_directory/.vimrc"

When I edit a file with my_vim, I do not have the correct colors.

I have the same problem when I use the command
:source /full_path_to_home/my_directory/.vimrc

If I copy the .vimrc file to the $ HOME directory, everything will be fine.

Where is the problem?

+4
source share
2 answers

From :help vimrc

Vim -u filename, "filename". 4. .

, vimrc, vimrc (/erc/vimrc/), . , vimrc:

if filereadable("/etc/vimrc")
  source /etc/vimrc
endif
+2

, $HOME , $HOME/my_directory , .

+1

All Articles