如何找到vim编辑器使用的vimrc文件? [英] How to locate the vimrc file used by vim editor?
本文介绍了如何找到vim编辑器使用的vimrc文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
vim编辑器中是否有命令来找到 .vimrc
文件的位置?
Is there a command in the vim editor to find the .vimrc
file location?
推荐答案
只需尝试执行以下操作:
Just try doing the following:
:version
您将获得包含以下内容的输出:
You will get an output which includes something like:
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
Herbert在评论中指出,这是 vim
寻找的地方 vimrc
,这并不意味着它们存在。
As noted by Herbert in comments, this is where vim
looks for vimrc
s, it doesn't mean they exist.
您可以检查<$ c $的完整路径c> vimrc 与
:echo $MYVIMRC
如果输出为空,则您的 vim
不使用用户 vimrc
(如果需要,只需创建它)。
If the output is empty, then your vim
doesn't use a user vimrc
(just create it if you wish).
这篇关于如何找到vim编辑器使用的vimrc文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文