簡體   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