Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: vi-open-line-* in Emacs mode
- X-seq: zsh-users 11435
- From: Philippe Troin <phil@xxxxxxxx>
- To: meino.cramer@xxxxxx
- Subject: Re: vi-open-line-* in Emacs mode
- Date: 19 Apr 2007 22:18:45 -0700
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20070420033415.GB20859@solfire>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20070420033415.GB20859@solfire>
- Sender: phil@xxxxxxxx
meino.cramer@xxxxxx writes:
> I often edit """scripts""" on the commandline, like
> short loops etc.
> Often too I forget to insert a specific line and
> have to re-edit my """script""". In the real world
> I am a Vi(m) user, but for command-line-editing
> I prefer Emacs-mode.
> In this mode I miss a keysequence to add/insert/open
> a new line.
ALT--ENTER opens a new line in emacs mode.
> I found vi-open-line-above and -below, but there seem
> no Emacs equivalent available .... (?)
> I tried to bind those functions:
>
> bindkey "\M-o" vi-open-line-below # vi like open line below cursor position
> bindkey "\M-O" vi-open-line-above # vi like open line above cursor position
>
> but this does not work.
Try:
bindkey "^[o" vi-open-line-below
bindkey "^[O" vi-open-line-above
Meta keys are seldom used anymore since they don't work with UTF-8.
Most terminal emulators send 'ESC-<char>' rather than 'meta-<char>'
these days when you press a ALT-key.
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author