oblitum
oblitum

Reputation: 12008

How to prevent NERDTree buffer deletion? (or reload it)

If I :bdat the NERDTree window, I cannot load it back by closing the NERDTree window and opening it back: it still comes empty.

How to solve this? Ideally I'd like to attribute no action to :bd in this buffer, but a proper reload shortcut would do.

Upvotes: 1

Views: 674

Answers (1)

pb2q
pb2q

Reputation: 59607

Typing :NERDTree should reopen the buffer even after :bd. Perhaps some other setting is causing it to reopen empty?

If you want to disable :bd in the NERDTree buffer, use this autocmd in your .vimrc:

autocmd FileType nerdtree cnoreabbrev <buffer> bd <nop>

Upvotes: 4

Related Questions