I have a repository of my home config files – http://hg.jackleo.info/home-configs
I noticed that my vim configuration is getting bigger and bigger (90% of commits is only related to vim) so I want to trow it to separate repository.
The problem is that since i’m using home-config repository at my actual home folder vimrc file is also in same place. If I would include subrepo to Vim configuration (folder .vim) I couldn’t commit .vimrc file to that sub-repository.
Is there a way to simply write import file_path_to_other_config
and hold exact configuration in .vim folder?
Advertisement
Answer
You could use the source command in your vimrc:
source file_path_to_other_config
Here is the vim help page on source: http://vimdoc.sourceforge.net/htmldoc/repeat.html#:source