On 2024-05-31, 04-psyche.tot...@icloud.com <04-psyche.tot...@icloud.com> wrote:
> Hi all,
>
> I use the following terminal:
>
> echo $TERM
> xterm-256color
>
> when in my ~/.profile I do:
>
> export EDITOR=nano
>
> everything works well.
>
> However, if I do 
>
> export EDITOR=vim
>
> then when I ssh into the machine, up and down arrow in the terminal do not 
> work anymore (it does not give me access to previous commands entered).

It's an extremely annoying misfeature in ksh.

If $EDITOR starts with the letters "vi" then it defaults to vi-style
command line editing. You can use "set -o emacs" to override that, but
then if you sudo/doas to root it will reset to vi-style editing because
of the exported EDITOR variable.

On some machines I got fed up enough with this to symlink
"emacs-notreally" to vim and set EDITOR=emacs-notreally...


Reply via email to