質問

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?

役に立ちましたか?

解決

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>

他のヒント

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top