Просмотр исходного кода

fix NERDTree automatic opening

cinaeco 13 лет назад
Родитель
Сommit
62d934cc49
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      vim/vimrc

+ 3 - 2
vim/vimrc

@@ -10,13 +10,12 @@ call pathogen#infect()
 "" Start Up
 """""""""""""""""""""""""""""""""""""""""""""""""""
 function! StartUp()
+    " Stuff in here will be called by autocmd below
     if 0 == argc()
         NERDTree
     end
 endfunction
 
-autocmd VimEnter * call StartUp()
-
 
 """"""""
 "" General Behaviours
@@ -44,6 +43,8 @@ if has("autocmd")
     \ endif
     " Source the vimrc file after saving it
     autocmd bufwritepost .vimrc source $MYVIMRC
+    " so far, this startup just opens NERDTree when there are no arguments
+    autocmd VimEnter * call StartUp()
 else
     set autoindent on
 endif