Re: [code] [textadept] Thoughts about custom key maps for command entry input?

From: Mitchell <m.att.foicica.com>
Date: Mon, 8 Apr 2013 15:42:12 -0400 (Eastern Daylight Time)

Pete,

On Sun, 7 Apr 2013, Peter Kazmier wrote:

> I've been playing around with the key bindings for incremental search
> such that while searching, pressing:
>
> - RET leaves the caret at its current location and ends the search,
> - Ctl-S moves forward to the next match,
> - Ctl-R moves backward to the previous match,
> - etc ...
>
> I generally like this type of functionality better as I can quickly move
> backward and forward while in the incremental search. This was very easy
> to add:
>
> [snip]
>
> While hacking that, I thought that a find command entry keymap would be
> very handy as users could then easily and quickly bind various functions
> to keys while in command entry mode. In this case, I could simply have
> defined a `find_next` and `find_prev` functions and bound them to the
> command entry keymap if it existed. Thoughts?

This doesn't seem as useful as it sounds since the command entry is so
modal. I am reluctant to expose the "incremental find"-specific functions
you proposed (or any other modal functions) to Textadept's API because
they only behave properly in a certain context. (e.g. In order to have
find_incremental_next() or find_incremental_prev() work, you have to have
called or started incremental search.)

I liked your earlier solution with the COMMAND_ENTRY_KEYPRESS handler
doing things with incremental find. That would be a very useful user
extension.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 08 Apr 2013 - 15:42:12 EDT

This archive was generated by hypermail 2.2.0 : Tue 09 Apr 2013 - 06:49:34 EDT