开发者

Is it possible to have 2 Nerd Trees in same view in vim

I am using vim 7.3 and the NERDTree 4.1 plugin.

I have been trying to get 2 NERDTrees to appear in the same tab but can't find how to do it so I am on the verge of calling it a 开发者_如何学运维day.

Just wondered if anyone new if it was possible and if so how?


Hmm, I don't think that's possible, at least I don't know any solution. NERDTree window is positioned in a screen-wise way, even if you open another window and toggle the Tree it will affect the single one.

I have been searching the help, but the closest topic I found is about window positioning. It says nothing about multiple windows, but suggests that one exclusive NERDTree window will be present on screen:

------------------------------------------------------------------------------
                                                             'NERDTreeWinPos'
Values: "left" or "right"
Default: "left".

This option  is used  to determine  where NERD  tree window  is placed  on the
screen.

This  option  makes  it  possible   to  use  two  different  explorer  plugins
simultaneously. For example, you could have  the taglist plugin on the left of
the window and the NERD tree on the right.

------------------------------------------------------------------------------


I get close to the desired outcome by pressing 's' over a directory node, this opens a new vertical window with NERDTree characteristics but without the positioning.

Therefore I then might need to to resize so the file open for edit has greater presidence:

vert resize 30

and possibly set height and width of the new NERDTree window so it doesn't keep moving with new files:

set wfw
set wfh

And then every time I try open a node out of the new window (with 's') it shifts to the right so I need to move it back with.

CTRL-W_H

Not very convenient I must admit.

In that case the answer to the questions is no, in NERD Tree's current state


Just Open NerdTree and go to command mode and write :sp or :vsp. Now the nerd tree will splited in 2 panes.

This has some problems in navigation and resize wont work as expected. Else it works good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜