Prevent fuzzyfinder files from loading in the NERDTree window

I use both fuzzyfinder and NERDTree for vim. When my cursor is in the window where NERDTree is located and I use fuzzyfinder, it will open the file in the NERDTree window.

Is there a way to prevent this behavior and make the files not open in the NERDTree window?

+6
source share
2 answers

You will need to use a custom mapping or override the default FuzzyFinder mapping to run it. There you can check the open NERDTree and go to the previous window (or maybe close NERDTree), for example:

:nnoremap <silent> <F5> :<Cu>if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) == winnr() <Bar> wincmd p <Bar> endif <Bar> FufBuffer<CR> 
+2
source
0
source

All Articles