Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-close NERDTree when opening file in new tab

Tags:

vim

nerdtree

When opening a file in a new tab in vim through NERDTree, I want the NERDTree window to be closed on the previous tab. The reason being, the tab title displays NERDTree in the previous tab. I want the default behavior, ie, the name of the file to be displayed rather than the word NERDTree. If I switch back to the previous tab and close the NERDTree window, the default behavior is noticed. What configuration settings do I need to add to auto-close NERDTree in my previous tab?

like image 793
Jerry Ajay Avatar asked Feb 20 '15 15:02

Jerry Ajay


1 Answers

Have you tried setting:

let NERDTreeQuitOnOpen=1

This worked for me.

like image 109
darryn.ten Avatar answered Oct 05 '22 23:10

darryn.ten