Skip to content

Nerdtree not autoclose on new tab #1248

Closed
@hungpham3112

Description

@hungpham3112

I open a new tab in vim use :tabnew and it has a new NERDTree because i use this feature in my _vimrc but when i close the tab it just deletes a file, the NERDTree was still there.

This is line i use in vim to close nerd tree when it is a last window but it just works in 1 tab
" Exit Vim if NERDTree is the only window left.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif

I think Nerdtree-developers need to add new feature about my issue to improve UX. Thanks for reading.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions