From 4f6929bcce41820ae5655399303702be0434143d Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 18 Sep 2025 23:19:07 +0200 Subject: [PATCH] less: Keep position when editing in vim via e/E --- .config/lesskey | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/lesskey b/.config/lesskey index 0b460d7..d020a8f 100644 --- a/.config/lesskey +++ b/.config/lesskey @@ -6,11 +6,12 @@ # NOTE: the current file can be edited with `v` already, but this doesn't work # when reading from stdin # 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 +e noaction g|$no-ansi-sgr | nvim -\n'' # edit in vim while keeping them -E noaction g|$nvim -\n +E noaction g|$nvim -\n'' #env # NOTE: Lines need a trailing space when concatenating