Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,20 @@ nnoremap <leader>pt :!prettier %<CR>

" }}}

" 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(<q-args>)

" this may no longer be required.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .local files are widely used so I wouldn't get rid of it.

if filereadable(expand('~/.vimrc.local'))
source ~/.vimrc.local
endif
endif