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
2
plug.vim
2
plug.vim
@ -645,7 +645,9 @@ function! s:prepare()
|
|||||||
silent! unmap <buffer> X
|
silent! unmap <buffer> X
|
||||||
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap cursorline modifiable
|
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap cursorline modifiable
|
||||||
setf vim-plug
|
setf vim-plug
|
||||||
|
if exists('g:syntax_on')
|
||||||
call s:syntax()
|
call s:syntax()
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:assign_name()
|
function! s:assign_name()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user