Closed backpropper closed 5 months ago
Before creating an issue, take some time to search these resources. It's possible that someone else has already asked your question and gotten an answer.
:h NERDTree
I want to close the tab when nerdtree is the only remaining window in the current tab after I close the file in another window.
I'm using the following: autocmd BufEnter * if tabpagenr('$') > 1 && !len(filter(tabpagebuflist(), 'getbufvar(v:val,"&ft") != "nerdtree"')) | tabclose | endif
autocmd BufEnter * if tabpagenr('$') > 1 && !len(filter(tabpagebuflist(), 'getbufvar(v:val,"&ft") != "nerdtree"')) | tabclose | endif
Can someone please help? This isn't working and I get an error when nerdtree is the only window in a tab.
Found the solution in the README
Before creating an issue, take some time to search these resources. It's possible that someone else has already asked your question and gotten an answer.
:h NERDTree
State Your Question
I want to close the tab when nerdtree is the only remaining window in the current tab after I close the file in another window.
I'm using the following:
autocmd BufEnter * if tabpagenr('$') > 1 && !len(filter(tabpagebuflist(), 'getbufvar(v:val,"&ft") != "nerdtree"')) | tabclose | endif
Can someone please help? This isn't working and I get an error when nerdtree is the only window in a tab.