From 45a898ef91eda888f3682b3cf3409627c89cbedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik@grepit.se> Date: Sat, 28 May 2022 13:20:26 +0200 Subject: [PATCH] Improve tmux interoperability --- .vimrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.vimrc b/.vimrc index 8d6b7aa..ed4acbc 100644 --- a/.vimrc +++ b/.vimrc @@ -334,6 +334,16 @@ set background=light exec "set <F24>=\<Esc>[O" exec "set <F25>=\<Esc>[I" +" 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. +if !has('gui_running') && &term =~ '^\%(screen\|tmux\)' + let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" + let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" +endif + +syntax on +set termguicolors + " Modify PaperColor to have white background let g:PaperColor_Theme_Options = { \ 'theme': { -- GitLab