Open the file from NERDtree in a specific window (or last active)

In VIM, I have 4 windows open and the NERD tree: screenshot Therefore, when I try to open a file from NERD, it opens in the first buffer (topleft pos). Sometimes in other buffers. Is there a way to open the file in the lower right position? Mb there are workarounds? Maybe I can force NERDtree to open the file in the last active window? At the moment, this does not work as follows: (

UPD: it seems the problem is hidden buffers. When the buffer was opened in one window and then replaced by another - if you try to open the first in another window, you will open it in the window that was opened for the first time.

+7
vim nerdtree
source share
1 answer

I use NERD tree 4.1.0 on Vim 7.2, and NERDTree opens files by default in the last active window.

From the docs:

Default key: o

Map Option: NERDTreeMapActivateNode

Applies to: files and directories.

If a node file is selected, it opens in the previous window.

But pressing a button when a file is selected has the same effect.

+6
source share

All Articles