1

I use Vim plugin NerdTree. If I have to quickly add a file, the NerdTreeMenu I get by pressing m is very helful.

How I can close my NerdTreeMenu? I'm unable to find information in any documentation on closing the NerdTree menu.

1

2 Answers 2

2

It is either :NERDTreeClose to close it, or :NERDTreeToggle to toggle it on and off :)

Edit: @Gustav Blomqvist reminded me, that you can also use the classic vim exit commands while the NERDTree window is in focus:

  • :q

  • ZZ 2x(Shift + z)

  • ^Wq (Ctrl-w + q)

3
  • 1
    :q in the NERDTree window also works. :) A tip is to bind :NERDTreeToggle Ctrl+n to toggle NERDTree nnoremap <C-n> :NERDTreeToggle<CR> Nov 18, 2022 at 10:42
  • Yeah right you could also do it that way. You can also use the classic vim exit commands (:q / ZZ / ^Wq) I will write that to my answer, thanks :))
    – Pixelbog
    Nov 18, 2022 at 14:59
  • 2
    OP is not asking how to close the NerdTree window.
    – romainl
    Nov 21, 2022 at 12:38
0

If the NERDTree window is in focus then just a simple q will work.

2
  • 2
    OP is not asking how to close the NerdTree window.
    – romainl
    Nov 21, 2022 at 12:38
  • Oh my bad Ctrl-c closes the NERDTreeMenu Nov 21, 2022 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.