jistr / vim-nerdtree-tabs

NERDTree and tabs together in Vim, painlessly
Apache License 2.0
1.43k stars 129 forks source link

After auto-finding newly open buffer, do not move cursor to NERDTree #100

Closed StrongerXi closed 2 years ago

StrongerXi commented 2 years ago

I found the auto-find feature very useful when using fzf in vim. However, it's slightly annoying that the cursor moves to the NERDTree split, which prevents me from immediately editing the buffer I just openned.

I see that the cursor movement behavior comes from NERDTreeFind; this PR retains the cursor position via wincmd p, without having to modify NERDTreeFind.

StrongerXi commented 2 years ago

Closing the PR, I'll just use my forked branch.