Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vi command line editing
- X-seq: zsh-users 1416
- From: Andrew Main <zefram@xxxxxxxxx>
- To: stephen@xxxxxxxxx (Stephen Marley)
- Subject: Re: vi command line editing
- Date: Tue, 24 Mar 1998 17:06:59 +0000 (GMT)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <19980324162607.38795@xxxxxxxxxxxxxxxx> from "Stephen Marley" at Mar 24, 98 04:26:07 pm
Stephen Marley wrote:
>You see, my fingers are tuned to using the older vi's (eg SunOS's) where
>movement using the arrow keys doesn't work in insert mode.
Arrow keys don't properly `work' in insert mode in *any* vi, since there
is no such thing as an insert `mode'.
> I have always map!ed the arrow keys to <esc>l or <esc>k etc so
>that they take me into command mode and then move.
You can do much the same thing with zsh:
bindkey -s "^[[A" "^[k"
bindkey -s "^[[B" "^[j"
bindkey -s "^[[C" "^[l"
bindkey -s "^[[D" "^[h"
bindkey -s acts like vi's map command. The recent betas can do this
in a slightly better way, but I think this is exactly the functionality
you're looking for.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author