From 6f60192d71b3b37ee803f978392b52175697a2a5 Mon Sep 17 00:00:00 2001 From: Scott Stevenson Date: Sun, 24 Jan 2016 21:33:51 +0000 Subject: [PATCH] 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`. --- plug.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 2a06dc7..57a5100 100644 --- a/plug.vim +++ b/plug.vim @@ -645,7 +645,9 @@ function! s:prepare() silent! unmap 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()