Prevent fuzzyfinder loading files in NERDTree window
Asked Answered
K

2

7

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?

Katushka answered 10/12, 2012 at 11:35 Comment(0)
M
2

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>
Monticule answered 10/12, 2012 at 13:8 Comment(0)
S
0

See if this script (at the bottom of the page works for you.

Survey answered 10/12, 2012 at 13:7 Comment(3)
I see nothing wrong with having alternative navigation methods. (I even use FuzzyFinder, NERDTree, MRU, and MruMenu!) More power to you!Monticule
I second @IngoKarkat, I don't see anything wrong with what I'm trying to achieve, I actually use Command-T, FuzzyFinder and NERDTree and it works very well for me. On another note, I've tried that script and it doesn't work.Katushka
Command-T and FuzzyFinder do essentially the same things: having two plugins with so much overlap seems superfluous to me.Survey

© 2022 - 2024 — McMap. All rights reserved.