In Vim, is it possible to change the default location of the user vimrc file, i.e., from $HOME/.vimrc to some other location ?
The system vimrc should normally be left unmodified and is located in the $VIM * directory.
vim/ directory ($HOME/vimfiles/ for MS-Windows). That makes it easy to copy it to another system.
They are not the same. The vimrc is the file you edit to change vim's behavior. It is a the configuration file. The viminfo is like a cache, to store cut buffers persistently, and other things.
Another solution might be to create a symlink
to you preferred location. I have my .vimrc
in $HOME/.vim/.vimrc
and symlink
to it. This way I can have it in a git repo and backup it.
You must start vim with the command vim -u ./path/to/your/vimrcfile
vim -u NONE
is a good way to start Vim without any plugin or customisation.
See :help starting.txt
for more information.
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