Nerdtree: Re-open NerdTree in new tabs

Created on 25 Feb 2010  Â·  6Comments  Â·  Source: preservim/nerdtree

I would NerdTree to be re-opened when we open a file in a new tab.
I'm using a little hack found here : http://stackoverflow.com/questions/1979520/auto-open-nerdtree-in-every-tab but I think it's a feature which a lot of people want so why don't make it possible enabling an option ?

P.S. : Sorry for my English but i'm French…

Most helpful comment

vim-nerdtree-tabs is no longer maintained but this setting seems to work:

autocmd BufWinEnter * NERDTreeMirror

From: https://stackoverflow.com/a/2762067/894420

All 6 comments

Absolutely agree with the first post author. It'll be great if you add such option.

I implemented this feature in my fork of NERDTree. It is an optional feature that is enabled using when in the NERDTree help menu (accessed using '?').

I sent a pull request to the maintainer asking him to merge the change into his repository.

In the meantime, you can see the change here:
http://github.com/thenigan/nerdtree/commit/7fb73df970facea8840d40114198ab87a0e2d05c

Thank you, I think it's exactly what I exepted. I hope it will be merged.

I've made a NERDTree extension that does this and more (keeps all NERDTrees in sync, autocloses NERDTree on closing a file, keeps meaningful tab names - no more 'NERD_tree_1' tabs etc.). You can grab it here: https://github.com/jistr/vim-nerdtree-tabs

Hey guys,

I will not be adding this functionality to the core plugin. vim-nerdtree-tabs from @jistr is the way to get this behaviour.

vim-nerdtree-tabs is no longer maintained but this setting seems to work:

autocmd BufWinEnter * NERDTreeMirror

From: https://stackoverflow.com/a/2762067/894420

Was this page helpful?
0 / 5 - 0 ratings