diff --git a/config/general.vim b/config/general.vim index 0d33d40ad..aaf979ba2 100644 --- a/config/general.vim +++ b/config/general.vim @@ -4,6 +4,17 @@ exe 'set wildignore+=' . g:spacevim_wildignore if has('filterpipe') set noshelltemp endif +if g:spacevim_enable_guicolors == 1 + if !has('nvim') && has('patch-7.4.1770') + let &t_8f = "\[38;2;%lu;%lu;%lum" + let &t_8b = "\[48;2;%lu;%lu;%lum" + endif + if exists('+termguicolors') + set termguicolors + elseif exists('+guicolors') + set guicolors + endif +endif if count(g:spacevim_plugin_groups, 'colorscheme') && g:spacevim_colorscheme !=# '' "{{{ try exec 'set background=' . g:spacevim_colorscheme_bg @@ -20,14 +31,3 @@ endif if !empty(g:spacevim_guifont) exe 'set guifont=' . g:spacevim_guifont endif -if g:spacevim_enable_guicolors == 1 - if !has('nvim') && has('patch-7.4.1770') - let &t_8f = "\[38;2;%lu;%lu;%lum" - let &t_8b = "\[48;2;%lu;%lu;%lum" - endif - if exists('+termguicolors') - set termguicolors - elseif exists('+guicolors') - set guicolors - endif -endif