[英]Unable to locate the vimrc file
I am trying to update my vimrc file to add new plugins to vim. 我正在尝试更新我的vimrc文件,以将新插件添加到vim。 However my vimrc is not a dot file.
但是我的vimrc不是一个点文件。 In fact the
:scriptnames
command is displaying me this : 实际上
:scriptnames
命令正在向我显示以下内容:
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim74/debian.vim
3: /usr/share/vim/vim74/syntax/syntax.vim
4: /usr/share/vim/vim74/syntax/synload.vim
5: /usr/share/vim/vim74/syntax/syncolor.vim
6: /usr/share/vim/vim74/filetype.vim
7: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
8: /usr/share/vim/vim74/plugin/gzip.vim
9: /usr/share/vim/vim74/plugin/logiPat.vim
10: /usr/share/vim/vim74/plugin/matchparen.vim
11: /usr/share/vim/vim74/plugin/netrwPlugin.vim
12: /usr/share/vim/vim74/plugin/rrhelper.vim
13: /usr/share/vim/vim74/plugin/spellfile.vim
14: /usr/share/vim/vim74/plugin/tarPlugin.vim
15: /usr/share/vim/vim74/plugin/tohtml.vim
16: /usr/share/vim/vim74/plugin/vimballPlugin.vim
17: /usr/share/vim/vim74/plugin/zipPlugin.vim
So I am not sure if I should update my /usr/share/vim/vimrc
or should I create a new dot file at ~/.vimrc
(which does not exist on my machine yet) as it is recommended here ? 所以,我不知道我是否应该更新我
/usr/share/vim/vimrc
或者我应该创建一个新的文件点~/.vimrc
(这并不在我的机器上还存在)的建议在这里 ?
/usr/share/vim/vimrc
is installed by your Linux distribution; /usr/share/vim/vimrc
由Linux发行版安装; like anything under /usr/share
, system updates will eventually override changes you make there. 像
/usr/share
下的任何内容一样,系统更新最终将覆盖您在此处所做的更改。
Create your own configuration in ~/.vimrc
(or ~/.vim/vimrc
); 在
~/.vimrc
(或~/.vim/vimrc
)中创建自己的配置; if you avoid hard-coding of paths, you can even share this across multiple systems that you use. 如果您避免对路径进行硬编码,甚至可以在使用的多个系统之间共享它。 Vim will automatically use this file on the next start.
Vim将在下次启动时自动使用此文件。 See
:help vimrc
for details. 有关详细信息,请参见
:help vimrc
。
The only use case for editing system-wide configuration is when you are the system administrator of a multi-user system (eg for students), and you want to make everyone use the same, consistent settings. 编辑系统范围的配置的唯一用例是当您是多用户系统的系统管理员(例如,针对学生)时,并且您想让每个人都使用相同的一致设置。 Some distributions even allow to do that without touching those distribution-controlled files (via
/etc/vim/vimrc.local
in Debian, for example). 有些发行版甚至允许这样做而无需接触那些发行版控制的文件(例如,通过Debian中的
/etc/vim/vimrc.local
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.