Reputation: 28081
I'm going to upload my vimrc to githug. But some settings is not general(e.g. on slower machine I dont use cursorcolumn)
So I don't want to put all my settings in one file. How to do this? Is there something like 'source' in bash?
Upvotes: 2
Views: 550
Reputation: 901
to avoid errors if the file doesn't exist surround it with if filereadable
.
I have generalized and shared my vimrc and have a line that sources a .vimrc.loc in the users home directory to allow for customization by people that use my vimrc.
if filereadable($HOME."/.vimrc.loc")
source ${HOME}/.vimrc.loc
endif
Upvotes: 2
Reputation: 161644
There is a source
command in vim
:so[urce] {file}
Read Ex commands from {file}. These are commands that
start with a ":".
Triggers the |SourcePre| autocommand.
Upvotes: 2