1
0
mirror of https://github.com/xlogerais/config-vim synced 2025-06-13 10:46:56 +02:00

Added nerdtree preferences

This commit is contained in:
2015-03-01 22:13:59 +01:00
parent 6991d436e4
commit 869993c2f9
2 changed files with 16 additions and 6 deletions

9
prefs/nerdtree.vim Normal file
View File

@ -0,0 +1,9 @@
" NERDTree shortcut
map <C-n> :NERDTreeToggle<CR>
" 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
" close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif