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

From: Peter Kazmier <pete.att.kazmier.com>
Date: Mon, 8 Apr 2013 20:37:17 -0500

On Apr 8, 2013, at 2:42 PM, Mitchell <m.att.foicica.com> wrote:

>>
>> 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.)
>

Too bad we couldn't make specific functions return an error if they were not invoked in their appropriate modal context. I do think it is a shame that every module that uses command entry must hardcode keys instead of using a modal-specific keymap that would come with reasonable defaults, but at the same time allow users to rebind or extend with new functionality as desired. You have such powerful key binding machinery in place already (key chaining, etc ...), I was just trying to think of a way it could be extended to this case as it seems odd that we have to hardcode anything these days. Would love to hear if you have other thoughts or ideas?

Thanks!
Pete

-- 
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 - 21:37:17 EDT

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