From 9d805e8b11532617dc713393caf3cc4f6f4b1763 Mon Sep 17 00:00:00 2001 From: DustVoice Date: Mon, 17 Aug 2020 13:55:42 +0200 Subject: [PATCH] Fix terminal detection --- init.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.vim b/init.vim index 82ce086..8fb4783 100644 --- a/init.vim +++ b/init.vim @@ -8,7 +8,8 @@ runtime platform.vim if g:platform ==? "linux" "autocmd VimLeave * set guicursor=a:ver35-blinkon0 "set guicursor= - if $TERM ==? "alacritty" + let supported_terminals=["alacritty", "st-256color", "xterm-256color", "screen"] + if index(supported_terminals, $TERM) != -1 set termguicolors else set notermguicolors @@ -19,6 +20,7 @@ elseif g:platform ==? "xterm" set notermguicolors set guicursor= set t_Co= + autocmd ColorScheme dracula hi Visual cterm=reverse else set termguicolors endif