diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 7596732..fd040cd 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -11,10 +11,17 @@ filetype on " enable file type detection filetype plugin on " enable file type plugins filetype indent on " enable file type indents -set background=dark -" restrict vim to 16 ANSI colors in the palette instead of approximating 256 -set t_Co=16 +" You might have to force true color when using regular vim inside tmux as the +" colorscheme can appear to be grayscale with "termguicolors" option enabled. +" See: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6 +if !has('gui_running') && &term =~ '^\%(screen\|tmux\)' + let &t_8f = "\[38;2;%lu;%lu;%lum" " set foreground color + let &t_8b = "\[48;2;%lu;%lu;%lum" " set background color +endif + colorscheme selenized +set termguicolors +set background=dark " for per-directory vimrc files " see: https://jezenthomas.com/how-i-write-invoices-in-vim/