mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-11 21:03:49 -05:00
Don't prevent switching when NERDTree is the only window
@@ -1,6 +1,6 @@
|
|||||||
## How can I make sure vim does not open files and other buffers on NerdTree window?
|
## How can I make sure vim does not open files and other buffers on NerdTree window?
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" If previous buffer was NERDTree, go back to it.
|
" If more than one window and previous buffer was NERDTree, go back to it.
|
||||||
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" | b# | endif
|
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user