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:
parent
7e7dec9252
commit
6f60192d71
1 changed files with 3 additions and 1 deletions
4
plug.vim
4
plug.vim
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue