From efab1898d4eed7413c02364b25f56f1c1eb16d21 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Fri, 30 Oct 2026 18:33:41 +0100 Subject: [PATCH] adapt colors to the terminal background instead of forcing 'ron' on light terminals Generated by Mistral Vibe. --- config_files/.vimrc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/config_files/.vimrc b/config_files/.vimrc index d34b42b..6510037 100644 --- a/config_files/.vimrc +++ b/config_files/.vimrc @@ -40,14 +40,18 @@ syntax on " colors " --------------------------------------------------------------------- -set background=light -colorscheme default - -" use coloration 'torte' or other -" and specify no coloration in the background +" vim detects the terminal background at startup : it queries the +" terminal when it supports it, and falls back to 'dark'. do NOT set +" 'background' manually here, it would override the detection and +" break one of the two computers. the scheme then adapts : +" 'default' on a light terminal, 'ron' on a dark one "colo elflord "colo murphy -colo ron +if &background == "light" + colorscheme default +else + colo ron +endif highlight Normal ctermbg=NONE highlight nonText ctermbg=NONE