Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bindkey intro?



On Fri, Sep 26, 1997 at 01:27:04AM -0400, chutzpah wrote:
> 	okay, so i've been using zsh for a couple of years now, and i know that
> i've been barely scratching the surface of what it (or any other shell) can
> do.  so i've decided to actually dig in and start _doing_ things with the
> shell, starting with bindkey, which i've seen lots about but never actually
> used.
> 	i'm assuming that bindkey is what i would use to do the following
> extremely trivial task, for example, but have no idea how to do so: i'd
> like to be able to map the control+(left arrow) and control+(right arrow)
> keys to the sequences "ESC-b" and "ESC-w", respectively (so that, with
> VISUAL set to 'vi', they move the cursor one word to the left/right.
> 	so where would i go about figuring out how to do this in bindkey?  is
> there a faq?  i couldn't find a man page, though that could just be the
> fault of the poor man pages on my server.

bindkey "[32$" backward-word
bindkey "[33$" forward-word

the second argument being the codes sent by the key you choose. Try
CTRL-V + <your key> at the command-line to check the codes.

-- 

     Louis-David Mitterrand
     http://www.aparima.com/F1/
     mito@xxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author