1
0
mirror of https://github.com/xlogerais/config-vim synced 2024-11-10 00:21:41 +01:00
config-vim/after/plugin/nerdtree.vim
Xavier Logerais (Numericable - Ingénierie Système) 0a11a27f16 Correctly use the after directory to load nerdtree preferences
2015-03-02 12:14:35 +01:00

10 lines
410 B
VimL

" 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