简体   繁体   English

更改vimrc的位置

[英]Change location of vimrc

I'm trying to unclutter $HOME, and want to move my .vimrc into ~/.vim. 我试图整理$ HOME,并想将.vimrc移动到〜/ .vim中。 I've already looked at this and this , but none of the solutions presented are what I'm looking for. 我已经看过这个这个 ,但是所提供的解决方案都不是我想要的。

I do not want to alias vim with the -u flag because it won't be appropriately set if it is opened in some other way than from the shell. 我不想用-u标志作为vim的别名,因为如果以从shell以外的其他方式打开它,则不会适当设置它。

I do not want to use a symbolic link because it still shows up in $HOME. 我不想使用符号链接,因为它仍然显示在$ HOME中。

I will not compile it from source, I'd rather just use a symlink (which is what I'm currently doing) than deal with that mess. 我不会从源代码编译它,我宁愿只使用符号链接(这是我当前正在做的)而不是处理该混乱情况。

Can anyone offer some new ideas? 谁能提供一些新想法?

If you are using 7.4, you can simply move your ~/.vimrc file into your ~/.vim/ directory: 如果使用的是7.4,则只需将~/.vimrc文件移动到~/.vim/目录中:

~/.vim/vimrc    <--- "vimrc", not ".vimrc"

Try this method if you don't use 7.4. 如果您不使用7.4,请尝试此方法

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

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