我最近在 Windows 上安装了 vim 文本编辑器。我在 Google 上查找了有关 vimrc 文件位置的任何解释,但找不到任何有意义的解释。在哪里可以找到 vimrc 文件?
从: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.
Run Code Online (Sandbox Code Playgroud)
但是,Vim 不会vimrc自动为您创建文件,您需要自己创建。例子:
:!mkdir $HOME/vimfiles
:e $HOME/vimfiles/vimrc
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
23698 次 |
| 最近记录: |