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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user