mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 04:49:49 +08:00
Update README.markdown
This commit is contained in:
parent
593c16add3
commit
1d46d6df3e
|
@ -159,7 +159,7 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
|
|||
### How can I prevent other buffers replacing NERDTree in its window?
|
||||
|
||||
```vim
|
||||
" If another buffer tries to replace NERDTree, put in the other window, and bring back NERDTree.
|
||||
" If another buffer tries to replace NERDTree, put it in the other window, and bring back NERDTree.
|
||||
autocmd BufEnter * if bufname('#') =~ 'NERD_tree_\d\+' && bufname('%') !~ 'NERD_tree_\d\+' && winnr('$') > 1 |
|
||||
\ let buf=bufnr() | buffer# | execute "normal! \<C-W>w" | execute 'buffer'.buf | endif
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user