有没有办法用自定义vimfiles运行Vim

时间:2014-02-03 16:33:06

标签: vim

我的$HOME/vimfiles中有我的Vim配置。但是,有时我想尝试修改配置而不会弄乱我的标准设置。是否可以让vim查看启动文件的不同vimfiles目录?

最简单的选择可能是将$HOME设置为不同的值并运行Vim,但这会干扰其他软件(我在Windows上,所以它不像Unix用户那么糟糕,但我使用Msys对我的一些工作,并设置$HOME会影响其他东西。

1 个答案:

答案 0 :(得分:1)

  -u {vimrc}  Use  the  commands in the file {vimrc} for initializations.  All the
                   other initializations are skipped.  Use this to edit a special  kind
                   of files.  It can also be used to skip all initializations by giving
                   the name "NONE".  See ":help initialization"  within  vim  for  more
                   details.

e.g。我有一个非常基本的vimrc文件,保存为~/base.vimrc和别名:

kent$ alias bvi
bvi='vim -u ~/base.vimrc'
相关问题