Last active
March 19, 2021 03:09
-
-
Save VernonGrant/0ed406bbd10a1fe29120280be19dac09 to your computer and use it in GitHub Desktop.
Project specific vimrc file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 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