Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

NERDTree master opening an existing buffer jumps to different tab #170

Closed
agibralter opened this Issue Jun 12, 2012 · 6 comments

Comments

Projects
None yet
3 participants

I've noticed that the behavior between 4.2.0 and the current master (4.2.0...2cb0fc7) changes the behavior of open: if a buffer is open in a different tab, hitting enter on a nerdtree node will jump to the tab with that buffer. Is there anyway to get the 4.2.0 behavior of opening the buffer in the last active window of the current tab?

That actually sounds like the correct behavior - or it should be the default, yet configurable.

(Sorry for the super long delay, but I accidentally pulled master and noticed this again).

"Open in prev window" is what the help window describes what should do; however, I'm getting the behavior "open in prev window if another tab does not contain a window with the file open, otherwise jump to that window in another tab."

blueyed added a commit to blueyed/nerdtree that referenced this issue Apr 9, 2014

blueyed commented Apr 9, 2014

I find this behavior annoying as well: I am using tabs to separate different workspaces, and do not want NERDTree to switch tabs.

According to the help there are only two modes:

    if b:NERDTreeType ==# "primary"
        let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in prev window\n"
    else
        let @h=@h."\" ". g:NERDTreeMapActivateNode .": open in current window\n"
    endif

I have worked around it locally by commenting the code that re-uses windows across tabs: blueyed/nerdtree@b2ec5c9

It would be nice, if NERDTree would use Vim's switchbuf setting. After all, you may not want to re-use windows in the current tab also.

Any updates on this one. Every time I update to origin/master when updating my vim bundles I get this behavior of tab-jumping and I have to reset to an old commit.

Here is the expected behavior that is not being respected in the docs: https://github.com/scrooloose/nerdtree/blob/master/doc/NERD_tree.txt#L265-L282

@agibralter agibralter referenced this issue in Xuyuanp/git-nerdtree May 8, 2014

Closed

NERDTree-o does not behave as expected #10

rogerhub added a commit to rogerhub/nerdtree that referenced this issue Jan 11, 2015

blueyed commented Oct 27, 2016

Seems to have been addressed in 87b2780.

@agibralter agibralter closed this Apr 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment