Re: [textadept] Re: tweaking find/replace ui

From: Robert <ro....at.web.de>
Date: Mon, 5 Jul 2010 13:17:24 +0200

On Mon, Jul 5, 2010 at 12:40 PM, Scott Weisman <sweis....at.gmail.com> wrote:
>> I don't know how hard it would be to have a Lua interface to the Find
>> dialog but one possibility would be to use Gcocoadialog [1] windows. I
>> think there are currently no checkboxes mentioned in the Cocoadialog
>> documentation [2], but maybe they could be added (or you don't need
>> them, depending on how you would like to customize it).
>>
>> [1]http://code.google.com/p/gcocoadialog/
>> [2]http://cocoadialog.sourceforge.net/documentation.htm
>>
>> I have some experimental code for the incremental search which uses
>> the statusbar. I'll post that when I get home.
>
> I'm less interested in a dialog than a more keyboard-oriented UI.
> Something like a Vim or Perl regexp, but probably less flexible.
>
> Can this be done now:
>
> 1. Intercept C-f (and other search/replace keys).
>
> 2. Split the window to open a one-line view on the bottom to enter the
> regexp.
>
> 3. Intercept a <CR> in that window to run the search/replace (and
> possibly close the view).
>
> If something like this can be done as-is right now, I'm cool (:-).
> Then I could just modify the find.lua code to do what I want.

Yes: ctrl-shift-f gives you the incremental search (which is a command
entry field) - it should be possible to adapt this functonality to use
the Lua patterns like in the find/replace dialog.
There is a line commented out in the find_incremental function which
makes it seem as if Mitchell had already experimented with something
like this?
If you don't mind seeing all the other options in the find/replace
dialog the check box for Lua patterns is remembered, so you wouldn't
have to change anything.
See also http://www.lua.org/pil/20.2.html, not regex but usually sufficient.

Robert
Received on Mon 05 Jul 2010 - 07:17:24 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:50:10 EST