On Sun, Aug 27 2017, Florian Ermisch <florian.ermisch@mailbox.org> wrote:
> Hi Jeremie,
>
> Am 27. August 2017 17:57:57 MESZ schrieb Jeremie Courreges-Anglas <jca@wxcvbn.org>:
>>On Sun, Aug 27 2017, Jan Stary <hans@stare.cz> wrote:
>>> This is current/amd64. I am using ksh(1) as a shell.
>>> Using ^R opens a search in the command history.
>>> However, with 'export EDITOR=vi', pressing ^R
>>> just literarily types '^R' and does not open
>>> the history search. Is that expected?
>>
>>EDITOR=vi puts the shell cli editor in vi mode,
>> see EDITOR and VISUAL in the manpage.
>> "Traditional" but quite annoying behavior.
>
> Shouldn't setting VISUAL override this
> function of EDITOR? AFAIK most tools
> look at EDITOR when choosing which
> editor ("visual" or not) to spawn for things
> like commit messages and not VISUAL.
I think most tools do use VISUAL, then EDITOR if VISUAL isn't set, then
some kind of default. VISUAL being a fullscreen editor like vi(1), and
EDITOR a line editor like ed(1).
> I'd think setting EDITOR to vi (or vim) and VISUAL to emacs should give you the
> behavior you want.
If the intent is to use vi, this doesn't work with programs that first
check VISUAL (eg crontab -e).
Rather:
VISUAL=vi
maybe EDITOR=vi if some of your tools don't look at VISUAL.
set -o emacs
> Regards, Florian
>
> PS: I actually use ZSH (and years ago
> ksh93 on OpenSolaris) with VISUAL=vi…
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
No comments:
Post a Comment