aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/.vimrc b/.vimrc
index a3b3e98..89d5c37 100644
--- a/.vimrc
+++ b/.vimrc
@@ -5,7 +5,6 @@ set number
set backspace=indent,eol,start
syntax on
set fileencodings=ucs=bom,utf-8,utf-16,gbk,big5,gb18030,latin1
-set t_Co=256
set showcmd
set autoread
set mouse=a
@@ -22,7 +21,12 @@ set hidden
set completeopt=menu,menuone
-if $COLORTERM is 'truecolor'
+" set Vim-specific sequences for RGB colors
+let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
+let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
+set t_Co=256
+
+if has("termguicolors")
set termguicolors
endif