繁体   English   中英

我在哪里可以找到 Windows 中的 vimrc 文件?

[英]Where can I find vimrc file in Windows?

我最近在 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.

但是,Vim 不会自动为您创建vimrc文件,您需要自己创建它。 例子:

:!mkdir $HOME/vimfiles
:e $HOME/vimfiles/vimrc

这取决于您如何在计算机上安装vim

我有一个通用的答案 - 在您用户的主目录中创建一个vimrc文件,这也可能是“正确”的答案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM