In the default configuration of Ubuntu 18 LTS server, pressing the V key in less
calls the nano
editor instead of vi
while none of the environment variables $LESSEDIT
, $VISUAL
or $EDITOR
are set.
I was able to restore the correct behavior as documented in man less
with update-alternatives --set editor /usr/bin/vim.basic
but this proves less
executes editor
instead of vi
.
Is this a documentation bug (Ubuntu behavior intentionally differing from default upstream less
behavior) or a bug in less or is it my fault (did I miss something) ?
It's a documentation bug in the man page, the behavior is documented in
/usr/share/doc/less/README.Debian
).In Debian and its derivatives (like Ubuntu) programs must use
editor
as standard editor if neither$VISUIAL
nor$EDITOR
is set, see the Debian policy manual.