[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] How the editor is determined when 'v' is type in bash (s
Re: [Help-bash] How the editor is determined when 'v' is type in bash (set -o vi)?
Sat, 28 Dec 2013 23:48:27 +0100
2013/12/28 Peng Yu <address@hidden>
> In some machine, it opens vim when 'v' is typed. In some machine, nano
> is used. VISUAL and EDITOR are not set in these machines. Does anybody
> know what determines which editor to use? Thanks.
It's documented for emacs mode to try $VISUAL, $EDITOR or emacs in that
order. It doesn't appear to be documented for vi mode, but it's the same,
except it falls back to vi instead of emacs.
On my Ubuntu system this has been patched (both for vi and emacs mode) to
also try "editor" before falling back to vi or emacs. "editor" is a symlink
you set to your favorite editor by running "update-alternatives --config
editor" in Ubuntu. This is probably inherited from Debian. As usual with PS
patches, it fails to change the manual page accordingly
The system where it runs nano probably has a patch like that.