motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 89e771ea963baafd2918019bc8083cfd32f43aa6 (tree)
parent 51de95ddeecc8fb088be448f2a0c610f7bf99490
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date:   Fri, 30 Mar 2012 16:09:25 +0100

make fugitive commands available in nerdtree bufs

Previously s:Detect() wasnt getting called for nerdtree buffers. I have
added two autocmd events to nerdtree - NERDTreeInit and
NERDTreeNewRoot. These are called when a tree is created, and when the
user changes the root.

Catch these events and call s:Detect() with the tree root path.

Diffstat:
Mplugin/fugitive.vim | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -162,6 +162,7 @@ augroup fugitive autocmd! autocmd BufNewFile,BufReadPost * call s:Detect(expand('<amatch>:p')) autocmd FileType netrw call s:Detect(expand('<afile>:p')) + autocmd User NERDTreeInit,NERDTreeNewRoot call s:Detect(b:NERDTreeRoot.path.str()) autocmd VimEnter * if expand('<amatch>')==''|call s:Detect(getcwd())|endif autocmd BufWinLeave * execute getwinvar(+bufwinnr(+expand('<abuf>')), 'fugitive_leave') augroup END