I've recently installed vim text editor on my Windows. I've looked for any explanation about the location of vimrc file on Google, but I couldn't find any meaningful explanation. Where can I find vimrc file ?
From :h vimrc
:
Places for your personal initializations:
Unix $HOME/.vimrc or $HOME/.vim/vimrc
MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc
or $VIM/_vimrc
Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc
or $VIM/.vimrc
The files are searched in the order specified above and only the first
one that is found is read.
RECOMMENDATION: Put all your Vim configuration stuff in the
$HOME/.vim/ directory ($HOME/vimfiles/ for MS-Windows). That makes it
easy to copy it to another system.
However, Vim will not create a vimrc
file for you automatically, you will need to create it yourself. Example:
:!mkdir $HOME/vimfiles
:e $HOME/vimfiles/vimrc
It depends on how you got vim
on your computer.
I have a generic answer instead - create a vimrc
file in your user's home directory, it's probably the "correct" answer as well.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.