after installing ubuntu 20.04.2 on my laptop, i set up vim. i found this colorscheme that i like: colorscheme. the colours for syntax highlighting were correct, but it didn't have the beautiful blue background that i wanted:
upon quick research, i found many claims about how setting $TERM
to xterm-256color
fixed their problems with incorrect vim color rendering. i wasn't sure this would help because after
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum<77; colnum++) {
r = 255-(colnum*255/76);
g = (colnum*510/76);
b = (colnum*255/76);
if (g>255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'
this i knew my terminal supported true colors. i export $TERM=xterm-256color
anyway and now all the colors are rendered incorrectly.. it has the same background it had before changing $TERM
, but now it looks like this:
clearly $TERM
messed everything up, what is the default value of $TERM
?
also if anyone has an idea how to fix my vim.... adding set t_Co=256
did not fix anything. also installed ncurses-term
. no fix.
if it helps, my .vimrc
:
set t_Co=256
colorscheme bluewery
let g:lightline = { 'colorscheme': 'bluewery'} "this is to be specified for the colorscheme
syntax on
set tabstop=2
set noexpandtab