I want to be able to o
or double click on a file in NERDTree, and have it open in a split to the right, and have NERDTree stay open. I haven't found the magic dust to sprinkle on my .vimrc to make this happen yet, can anyone help?
I'd want to to behave like any GUI text editor, where the explorer persists and the files open and close in the 'main pane'.
Thanks for any insight!
Try this in your .vimrc
:
:let NERDTreeQuitOnOpen = 0
I find the following mappings useful:
nnoremap <Leader>d :let NERDTreeQuitOnOpen = 1<bar>NERDTreeToggle<CR>
nnoremap <Leader>D :let NERDTreeQuitOnOpen = 0<bar>NERDTreeToggle<CR>
So \d
opens a NERDTree that closes on file selection, while \D
opens a persistent/pinned NERDTree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With