1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Fix true color support issue

Some terminal, for example, xshell, does not support true colors. In this case, we should not set the termguicolors option.
This commit is contained in:
jdhao 2019-10-24 12:10:06 +08:00 committed by GitHub
parent 0621506858
commit 09a84d1622
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
ui.vim
View File

@ -4,7 +4,13 @@
" support true colors! For a comprehensive list of terminals supporting true
" colors, see https://github.com/termstandard/colors and
" https://bit.ly/2InF97t)
set termguicolors
if exists("&termguicolors")
if $TERM == "xterm-256color"
set termguicolors
else
set notermguicolors
endif
endif
" Use dark background
set background=dark