I have NERDTree plugin installed but it is always present when I start vim like this:
vim .
I only want it to open on demand.
How can I stop it opening whenever I start vim?
I have NERDTree plugin installed but it is always present when I start vim like this:
vim .
I only want it to open on demand.
How can I stop it opening whenever I start vim?
Try adding
let g:NERDTreeHijackNetrw=0
to your vimrc and make sure there is no other line that sets this variable.
g:Smth
, if you really read NERDTree help you should’ve noted all options go without g:
prefix hence they are searched by NERDTreeHijackNetrw
. –
Gerard $ vim .
always opens a file explorer. If you don't have NERDTree or NERDTree is configured as per ZyX's answer you'll get netrw
by default anyway.
I wonder what would happen if the netrw
plugin was somehow removed.
gvim --noplugin .
and you get an empty buffer and the prompt "'.' is a directory". –
Viscountcy In your vimrc file, do below steps
comment autocmd VimEnter * NERDTree
, which stops opening nerdTree
by default
paste map <C-n> :NERDTreeToggle<CR>
in vimrc, this will open
NerdTree only when 'Ctrl+n' is pressed from keyboard
© 2022 - 2024 — McMap. All rights reserved.