Created
June 3, 2018 16:18
-
-
Save eloytoro/5cdfa72d62b92312edb30dcd25150ac6 to your computer and use it in GitHub Desktop.
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
function! NERDTreeFindUpdate() | |
if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) != -1 && expand("%:p") =~ getcwd() && !exists("b:fugitive_type") | |
:NERDTreeFind | |
exec "normal! \<c-w>p" | |
endif | |
endfunction | |
augroup nerd | |
autocmd! | |
autocmd BufReadPost * call NERDTreeFindUpdate() | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment