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

Enable syntax only during startup

Related discussion can be found in #83. If the user choose not to use
syntax highlighting, he can disable it by putting `syntax off` after
`plug#end()`. But since `plug#end()` is called by `PlugInstall` or
`PlugUpdate`, it is reenabled on those commands which is not desirable.
This commit fixes the issue by changing `plug#end` to do `syntax enable`
only during Vim startup.
Junegunn Choi 11 лет назад
Родитель
Сommit
f31477407a
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      plug.vim

+ 3 - 2
plug.vim

@@ -190,8 +190,9 @@ function! plug#end()
 
   call s:reorg_rtp()
   filetype plugin indent on
-  syntax enable
-  if !has('vim_starting')
+  if has('vim_starting')
+    syntax enable
+  else
     call s:reload()
   endif
 endfunction