diff --git a/vim/vimrc b/vim/vimrc index b1c8c39..6d559af 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -9,7 +9,12 @@ scriptencoding utf-8 "" Style " enable truecolor mode -set termguicolors +if has("termguicolors") + set termguicolors +else + let &t_8f = "\[38:2:%lu:%lu:%lum" + let &t_8b = "\[48:2:%lu:%lu:%lum" +endif set background=dark let g:gruvbox_contrast_dark='hard' let g:gruvbox_sign_column='bg0' @@ -17,12 +22,6 @@ let g:gruvbox_sign_column='bg0' " Show some gui colors in term let g:gruvbox_guisp_fallback='bg' colorscheme gruvbox -" enable truecolor support -set termguicolors -if ! has('termguicolors') - let &t_8f = "\[38:2:%lu:%lu:%lum" - let &t_8b = "\[48:2:%lu:%lu:%lum" -endif " General stuff set nowrap