I outsourced a few sections of my .vimrc
to .vim/custom/binds/foo.vim
to seperate binds for different languages. I know about after
but I want to keep the structure I am currently using.
I often find my self changing mappings in foo.vim
while working in some file.foo
, and don't want to close and reopen file.foo
file every time I make changes to foo.vim
.
I have noremap \c0 <Esc>:source<Space>~/.vimrc<Enter>
in my .vimrc
and it performs exactly what I want for the mappings in the rc.
I tried to include runtime! custom/binds/*.vim
but this does not seem to work. Not even when executed manually.
:help runtime
:
When {file} contains wildcards it is expanded to all
matching files. Example:
:runtime! plugin/*.vim
what am I missing here?
edit:
inside my .vimrc
I :source ~/.vim/custom/binds/foo.vim
. so sourcing works fine, but I have to do this for every file seperatly.