Automatically close NERDtree when opening file
I have installed NERDtree 4.1.0.
I have mapped <leader>n
to :NERDTreeToggle<CR>
.
I would like to use this in a way where I can press <leader>n
, then locate the deisred file in the explorer, press enter and have the NERDtree explorer disappear again, automatically.
Can someone help me with this?
Solved by putting let g:NERDTreeQuitOnOpen = 1
in my .vimrc
.