commit 1d46d6df3e581984d4b31d30d362cb94bc993e1d
parent 593c16add35a5461f189b8189abe219f7bbbd604
Author: Phil Runninger <PhilRunninger@users.noreply.github.com>
Date: Tue, 9 Feb 2021 21:50:35 -0500
Update README.markdown
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.markdown b/README.markdown
@@ -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
```