Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: CLI Tricks
- X-seq: zsh-users 6873
- From: Pavol Juhas <juhas@xxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: CLI Tricks
- Date: Fri, 12 Dec 2003 13:40:34 -0500
- In-reply-to: <25ajtv4u5ps1npttivtiguuljeb27f0u4m@xxxxxxx>
- Mail-followup-to: zsh users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <ge9jtvgbe5b8ht7motdbfq9ggsjmfsq50d@xxxxxxx> <25ajtv4u5ps1npttivtiguuljeb27f0u4m@xxxxxxx>
On Fri, Dec 12, 2003 at 11:38:34AM +0000, zzapper wrote:
> >
> >is there any where to get it start in non-insert mode (ie command mode)
> >
> I meant NON-INSERT
You can do
# my-cr() pushes \r\e to zle buffer as if typed
my-cr() { zle -U $'\r\e' }
# define my-cr as widget function
zle -N my-cr my-cr
# insert mode maps
bindkey '^m' my-cr
bindkey '^j' my-cr
# command mode maps
bindeky -a '^m' my-cr
bindeky -a '^j' my-cr
which remaps <cr> to <cr><esc>. The very first input would be
in insert mode, but maybe you can live with that. ;-)
Pavol
Messages sorted by:
Reverse Date,
Date,
Thread,
Author