Question

I'm using both fuzzyfinder and NERDTree for vim. When my cursor is in the Window that NERDTree resides in and I use fuzzyfinder, it will open a file in the NERDTree window.

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

Was it helpful?

Solution

You'd have to use a custom mapping or override the default FuzzyFinder mapping to start it. In there you can then check for an open NERDTree, and jump to the previous window (or maybe close NERDTree), like this:

:nnoremap <silent> <F5> :<C-u>if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) == winnr() <Bar> wincmd p <Bar> endif <Bar> FufBuffer<CR>

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top