less: Open file (also stdin) in vim with e/E

The current file can be edited with `v` already, but this doesn't work
when reading from stdin.
This commit is contained in:
2025-06-20 15:41:35 +02:00
parent f3d8ea3de0
commit 3f621617ef
2 changed files with 19 additions and 0 deletions

View File

@@ -1,6 +1,17 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Julian Prein
#command
# 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
#
# edit in vim without any ANSI SGR sequences (e.g. color)
e noaction g|$no-ansi-sgr | nvim -\n
# edit in vim while keeping them
E noaction g|$nvim -\n
#env
# NOTE: Lines need a trailing space when concatenating