Dup Goto 📝

256Colour

PT2/editor/vim 07-31 13:46:46
To Pop
23 lines, 88 words, 753 chars Monday 2023-07-31 13:46:46

Use set t_Co=256 to enable support for xterm-256color. Then highlight CursorLine ctermbg=235 makes the cursorline slightly off-black to make it easier to see where you are. Sometimes underlining the cursor line helps, but this makes it impossible to distinguish underscores from whitespace.

set t_Co=256
highlight CursorLine ctermbg=235

From my .vimrc

colorscheme default
highlight LineNr ctermfg=yellow ctermbg=darkblue
highlight CursorLineNr ctermfg=black ctermbg=blue
function CLNoUnderline()
  highlight CursorLine cterm=none
endfunction
function CLUnderline()
  highlight CursorLine cterm=underline
endfunction
" highlight CursorLine ctermbg=darkgray
set t_Co=256
highlight CursorLine ctermbg=235
call CLNoUnderline()