mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-26 18:30:45 +08:00
Remove a similar tip in README file.
This commit is contained in:
parent
b78fa83373
commit
a229d8bb61
|
@ -102,23 +102,13 @@ Note: Now start vim with plain `vim`, not `vim .`
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
> How can I open NERDTree as a tab window automatically when vim starts up on opening a directory?
|
> How can I open NERDTree as a window automatically when vim starts up on opening a directory?
|
||||||
|
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
|
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
|
||||||
|
|
||||||
This trick also prevents NERDTree from hiding when first select a file.
|
This trick also prevents NERDTree from hiding when first select a file.
|
||||||
|
|
||||||
---
|
|
||||||
> How can I open NERDTree on startup, and have my cursor start in the other window?
|
|
||||||
|
|
||||||
Stick this in your vimrc:
|
|
||||||
|
|
||||||
autocmd vimenter * NERDTree
|
|
||||||
autocmd vimenter * wincmd p
|
|
||||||
|
|
||||||
*via [stackoverflow/Yohann](http://stackoverflow.com/questions/4277808/nerdtree-auto-focus-to-file-when-opened-in-new-tab/19330023#19330023)*
|
|
||||||
|
|
||||||
---
|
---
|
||||||
> How can I map a specific key or shortcut to open NERDTree?
|
> How can I map a specific key or shortcut to open NERDTree?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user