mtk*_*mtk 5 vim settings vimrc
检查手册页vim
说它-u
是让我选择不同 vimrc 文件的开关
-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.
Run Code Online (Sandbox Code Playgroud)
但是,我想保留默认配置,并从我的user-vimrc
文件中添加更多设置。我使用的命令是
$ vim -u user.vimrc *file-to-edit*
有什么方法可以实现这一目标吗?
更具体地说,我目前的行为正在失去什么:
没有我的 vimrc,我会得到一个默认的颜色方案,当我给我时user.vimrc
,颜色方案被关闭。我无法跟踪如何设置默认提供的颜色方案。没有默认值.vimrc
。
注意:我在共享环境中,所以我不想创建.vimrc
. 我将只提供我的 vimrc,它仅对我可用。
这.vimrc
只是一个像其他文件一样的 Vimscript 文件。您可以通过以下方式获取它
$ vim --cmd "source path/to/user.vimrc" *file-to-edit*
Run Code Online (Sandbox Code Playgroud)
有了这个,它就会成为第一位。还有-S {file}
命令行参数,它会在最后获取它(这使得它不适合插件初始化,但如果您只有一些映射和设置,则可以使用)。