From: Pavol Juhas <juhas@pa.msu.edu>
To: zsh users <zsh-users@sunsite.dk>
Subject: Re: CLI Tricks
Date: Fri, 12 Dec 2003 13:40:34 -0500 [thread overview]
Message-ID: <20031212184034.GC10416@pa.msu.edu> (raw)
In-Reply-To: <25ajtv4u5ps1npttivtiguuljeb27f0u4m@4ax.com>
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
next prev parent reply other threads:[~2003-12-12 18:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-12 11:32 zzapper
2003-12-12 11:38 ` zzapper
2003-12-12 16:42 ` Bart Schaefer
2003-12-12 17:25 ` zzapper
2003-12-12 18:19 ` Peter Stephenson
2003-12-12 18:40 ` Pavol Juhas [this message]
2003-12-12 11:48 ` Dominik Vogt
2003-12-12 11:56 ` zzapper
2003-12-12 12:39 ` Thomas Köhler
2003-12-12 14:58 ` zzapper
2003-12-12 15:11 ` Hisham Muhammad
2003-12-12 17:10 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031212184034.GC10416@pa.msu.edu \
--to=juhas@pa.msu.edu \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).