zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh list <zsh-workers@sunsite.dk>
Subject: Re: changing bindings in isearch mode?
Date: Sat, 17 Jan 2009 11:17:18 -0800	[thread overview]
Message-ID: <090117111718.ZM8873@torch.brasslantern.com> (raw)
In-Reply-To: <18801.32959.693653.15539@gargle.gargle.HOWL>

On Jan 17,  1:54am, Greg Klanderman wrote:
} 
} It looks like the isearch mode bindings are hardcoded, is that right?

Sort of.  isearch was implemented before zsh had the concept of 
keymaps, so instead of using a keymap with its own set of widgets,
it hijacks the names of the widgets from the original keymap and
does its own internal thing when it sees you attempt to execute
one of those widgets.

} I'd really like to have <return> bound to exit isearch, like it does
} in emacs..
} 
} Would it make sense to have an isearch keymap and use that?

I believe you should be able to accomplish this with a user-defined
wrapper widget that selects the keymap you want and then invokes the
appropriate built-in incremental-search widget.  I agree that's not
the best solution and that it would be better to re-implement isearch
with real widgets.
 
} Is there a key in isearch mode that will just exit isearch at the
} current position, and nothing else?

Yes:  Any undefined key.  So to make <enter> do that, you just have
to "bindkey -r ^M" (and possibly also ^J) in the keymap used by the 
aforementioned wrapper widget.


      parent reply	other threads:[~2009-01-17 19:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17  6:54 Greg Klanderman
2009-01-17 17:56 ` Peter Stephenson
2009-01-17 18:23   ` Greg Klanderman
2009-01-19  9:44     ` Peter Stephenson
2009-01-19 12:12       ` Peter Stephenson
2009-01-19 17:17         ` Bart Schaefer
2009-01-22  4:01           ` Greg Klanderman
2009-01-22  9:57             ` Bart Schaefer
2009-01-22 21:25               ` Greg Klanderman
2009-01-21 20:43         ` Greg Klanderman
2009-01-17 19:17 ` Bart Schaefer [this message]

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=090117111718.ZM8873@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).