diff --git a/.vimrc b/.vimrc index 76a5719f..cb641db8 100644 --- a/.vimrc +++ b/.vimrc @@ -60,6 +60,20 @@ nnoremap pt :!prettier % " }}} +" Allow different drivers to quickly re-source their personal configurations +" for ease of navigation and code manipulation +fu! Driver(name) + let fname='~/.vimrc.' . a:name + if filereadable(expand(fname)) + exec "source " . fname + else + echomsg "Cannot read configuration " . fname . ", please ensure that you have your developer config present on this machine." + endif +endfu + +:command! -nargs=1 Driver :call Driver() + +" this may no longer be required. if filereadable(expand('~/.vimrc.local')) source ~/.vimrc.local -endif +endif \ No newline at end of file