将vimrc分成两个文件?
我将把我的vimrc上传到githug。但有些设置不是通用的(例如,在速度较慢的机器上,我不使用光标或列)将vimrc分成两个文件?,vim,Vim,我将把我的vimrc上传到githug。但有些设置不是通用的(例如,在速度较慢的机器上,我不使用光标或列) 所以我不想把我所有的设置放在一个文件中。如何做到这一点?bash中是否有类似于“source”的东西?在vim中有一个source命令 :so[urce] {file} Read Ex commands from {file}. These are commands that start with a ":". Triggers t
所以我不想把我所有的设置放在一个文件中。如何做到这一点?bash中是否有类似于“source”的东西?在
vim
中有一个source
命令
:so[urce] {file}
Read Ex commands from {file}. These are commands that
start with a ":".
Triggers the |SourcePre| autocommand.
vim
:so[urce] {file}
Read Ex commands from {file}. These are commands that
start with a ":".
Triggers the |SourcePre| autocommand.
为避免文件不存在时出错,请使用
if filereadable
我已经概括并共享了我的vimrc,并且在用户主目录中有一行源代码a.vimrc.loc,以允许使用我的vimrc的人进行定制
if filereadable($HOME."/.vimrc.loc")
source ${HOME}/.vimrc.loc
endif
为避免文件不存在时出错,请使用
if filereadable
我已经概括并共享了我的vimrc,并且在用户主目录中有一行源代码a.vimrc.loc,以允许使用我的vimrc的人进行定制
if filereadable($HOME."/.vimrc.loc")
source ${HOME}/.vimrc.loc
endif