From 5128d1525109b69096f046b4176c6d12742fad34 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 19 Sep 2025 01:36:54 +0200 Subject: [PATCH] less: Strip all ANSI sequences, not just SGR Kitty's shell integration uses OSC sequences to mark the prompt and output in the scrollback buffer. When opening that in vim through less I want these to be gone as well. --- .config/lesskey | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/lesskey b/.config/lesskey index d020a8f..6afdd95 100644 --- a/.config/lesskey +++ b/.config/lesskey @@ -8,8 +8,8 @@ # NOTE: ^P omits the "done" message # NOTE: '' jumps back to the previous position # -# edit in vim without any ANSI SGR sequences (e.g. color) -e noaction g|$no-ansi-sgr | nvim -\n'' +# edit in vim without any ANSI escape sequences (e.g. color) +e noaction g|$no-ansi | nvim -\n'' # edit in vim while keeping them E noaction g|$nvim -\n''