Skip to content

Instantly share code, notes, and snippets.

@VernonGrant
Last active March 19, 2021 03:09
Show Gist options
  • Save VernonGrant/0ed406bbd10a1fe29120280be19dac09 to your computer and use it in GitHub Desktop.
Save VernonGrant/0ed406bbd10a1fe29120280be19dac09 to your computer and use it in GitHub Desktop.
Project specific vimrc file
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PROJECT SPECIFIC VIMRC "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if !exists("*LoadProjectVimrc")
function! LoadProjectVimrc()
let vimrcFile = findfile(".vimrc", ".;")
if !empty(l:vimrcFile)
execute ":so" l:vimrcFile
echom "A project specifc vimrc has been loaded."
endif
endfunction
endif
autocmd DirChanged * :call LoadProjectVimrc()
nnoremap <F12> :call LoadProjectVimrc()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment