1
0
Fork 0
mirror of synced 2024-11-16 14:05:34 -05:00

添加自己的快捷键映射关系,设置NERDTree的自动打开与自动关闭

This commit is contained in:
labrick 2015-11-27 13:10:03 +08:00
parent 83ecaa2e35
commit 6c576a1294

View file

@ -1,5 +1,16 @@
set nu
let Tlist_Auto_Open=1
syntax on
set tags=tags;
set autochdir;
set autochdir
"How can I open a NERDTree automatically when vim starts up if no files were specified?
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
"How can I close vim if the only window left open is a NERDTree?
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
nmap be :BufExplorer<CR>
nmap nt :NERDTree<CR>
nmap tl :Tlist<CR>