mirror of
https://github.com/xlogerais/config-vim
synced 2025-06-13 02:36:55 +02:00
Correctly use the after directory to load nerdtree preferences
This commit is contained in:
parent
9cb6d77a86
commit
0a11a27f16
9
after/plugin/nerdtree.vim
Normal file
9
after/plugin/nerdtree.vim
Normal 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
|
Reference in New Issue
Block a user