Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I switch in and out of NERDtree?

Tags:

vim

nerdtree

Is there a way to switch in and out of NERDtree -- mouse disabled? I know I can press 'q' to quit NERDtree and go back to text editor, but when I go back to NERDtree it doesn't keep track of which directories I had pressed open before, and I would like to keep the list of directories open. I referenced NERDtree help, but I couldn't find what I was looking for. Perhaps I missed something?

Thanks in advance.

like image 284
YOHAN Avatar asked May 17 '15 19:05

YOHAN


2 Answers

To switch between the NERDtree "window" and the text "window" with

Ctrl+w and then right arrow

and then to go back I use

Ctrl+w and then left arrow

For more info on "vim windows"

http://vimdoc.sourceforge.net/htmldoc/windows.html

like image 20
Johan Avatar answered Sep 28 '22 11:09

Johan


NERDTree opens as a sidebar next to the existing open windows. You can therefore use all Vim window movement commands to jump back and forth.

For example, <C-W>p (that's Ctrl + W followed by P) goes back to the previous window, and 1<C-W><C-W> goes to the first window (which usually is the leftmost split NERDTree). You'll find the whole list at :help window-move-cursor; for effective window handling, it's important you know these very well.

like image 113
Ingo Karkat Avatar answered Sep 28 '22 09:09

Ingo Karkat