mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
Remove the footer, that was probably accidentally created.
13
F.A.Q..md
13
F.A.Q..md
@@ -29,4 +29,15 @@ Use the `t` and `T` mappings in the NERDTree window.
|
||||
## How can I close NERDTree window after opening a file from it?
|
||||
Use this NERDTree setting: `let NERDTreeQuitOnOpen = 1`. However if you usually want NERDTree to stay open, but sometimes want it to close after opening a file, you can use one of these option.
|
||||
1. Use the NERDTree keys: `go` followed by `q`.
|
||||
1. You can map another key to do `goq` for you: `autocmd FileType nerdtree nmap d goq`
|
||||
1. You can map another key to do `goq` for you: `autocmd FileType nerdtree nmap d goq`
|
||||
|
||||
## How can I make sure vim does not open files and other buffers on NerdTree window?
|
||||
|
||||
```vim
|
||||
" If more than one window and previous buffer was NERDTree, go back to it.
|
||||
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif
|
||||
```
|
||||
If you are using vim-plug, you'll also need to add these lines to avoid crashes when calling vim-plug functions while the cursor is on the NERDTree window:
|
||||
```vim
|
||||
let g:plug_window = 'noautocmd vertical topleft new'
|
||||
```
|
||||
Reference in New Issue
Block a user