Only highlight vim-plug buffers if syntax enabled

Previously, syntax highlighting was turned on unconditionally in the
buffers opened by commands such as `:PlugUpdate`. With this commit,
highlighting is not applied if the user has disabled syntax highlighting
by calling `syntax off` after `call plug#end()` in their `vimrc`.
This commit is contained in:
Scott Stevenson 2016-01-24 21:33:51 +00:00
parent 7e7dec9252
commit 6f60192d71

View File

@ -645,7 +645,9 @@ function! s:prepare()
silent! unmap <buffer> X
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap cursorline modifiable
setf vim-plug
call s:syntax()
if exists('g:syntax_on')
call s:syntax()
endif
endfunction
function! s:assign_name()