From 858ea24adefa612509a5df0a7721387188e07616 Mon Sep 17 00:00:00 2001 From: Ole Morud Date: Sat, 4 Jun 2022 10:57:35 +0200 Subject: [PATCH] vim color fix for suckless st --- .vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vimrc b/.vimrc index 35f6c64..89fad43 100644 --- a/.vimrc +++ b/.vimrc @@ -37,8 +37,18 @@ set shiftwidth=4 autocmd filetype c nnoremap :w exec '!gcc '.shellescape('%').' -lm -o '.shellescape('%:r').' && ./'.shellescape('%:r') " Color scheme +if &term =~ '256color' + " disable Background Color Erase (BCE) so that color schemes + " render properly when inside 256-color tmux and GNU screen. + " see also https://sunaku.github.io/vim-256color-bce.html + set t_ut= +endif + +set t_8f=[38;2;%lu;%lu;%lum " set foreground color +set t_8b=[48;2;%lu;%lu;%lum " set background color set background=light set termguicolors +set t_Co=256 colorscheme melange " Save swap and undo and backup files in separate directory