You can disable v by binding it to noaction
: add
# command
v noaction
to ~/.lesskey
(or, if $XDG_CONFIG_HOME
is set and you’re using less
582 or later, $XDG_CONFIG_HOME/lesskey
), and, if you’re using less
581 or older, run lesskey
.
You can also bind v to a different command. For example, to make it move down a line instead of opening an editor, use
# command
v forw-line
instead. (The default binding is visual
.)
Another way to disable v in less
is to set VISUAL
to true
:
VISUAL=true less foo
Pressing v will then run true foo
, which will immediately return to less
.