diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..0f44cd1e --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,17 @@ +" 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 map a specific key or shortcut to open NERDTree? + map :NERDTreeToggle + + " How can I close vim if the only window left open is a NERDTree? + autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree. isTabTree()) | q | endif + + +" Easier split navigations +nnoremap +nnoremap +nnoremap +nnoremap