I have configured my .vimrc
to make my vim work, and then I renamed my .vimrc
to be .vimrc2
. After that my vim can run as clean mode, but when I run my vim with vim -u .vimrc2
, there are errors like this:
E10: \ should be followed by /, ? or &
line 59:
E10: \ should be followed by /, ? or &
line 60:
E10: \ should be followed by /, ? or &
line 61:
E10: \ should be followed by /, ? or &
line 73:
E117: Unknown function: pathogen#infect
E15: Invalid expression: pathogen#infect()
How could I make it work? My .vimrc2
works well if it is renamed to be .vimrc
and no -u
options are used.
Edit:
my vimrc is here: https://github.com/CoinCheung/learn-coding-notes/blob/master/vim/00-vimrc
help -u
: some initializations are skipped and compatible will be set (which you should disable in your vimrc)$HOME/.vimrc
exists, Vim switches tonocompatible
and then sources the file. By giving the file with-u .vimrc2
the file is sourced in compatible mode. So you should addset nocompatible
at the beginning of that file.See:help .vimrc
.