Re: [code] [textadept] Textadept 9 poll: Lua patterns or Regex?

From: Pedro Andres Aranda Gutierrez <paaguti.att.gmail.com>
Date: Mon, 4 Jul 2016 07:30:52 +0200

hi... I wouldn't mind having both. However, does it make sense? Unifying
would mean that newbies learn only one and that would maker the editor more
attractive to them. Since Lua is the grounds why not just Lua?
El 3/7/2016 14:26, "Ryan Pusztai" <rpusztai.att.gmail.com> escribió:

> I could use both. I am very familiar with Lua patterns and they do all I
> need, but I understand the argument to have a generic solution for a
> "programming" editor.
> --
> Regards,
> Ryan
>
> Sent from my phone
> On Jul 3, 2016 4:17 AM, "Chris Emerson" <c-ta.att.mail.nosreme.org> wrote:
>
>> Hi Mitchell,
>>
>> On Sat, Jul 02, 2016 at 11:07:10PM -0400, Mitchell wrote:
>> > The question I have for you is would you prefer to have Regex
>> > searches instead of Lua pattern searches?
>>
>> As someone who implemented regexes using LPEG so that I can use them in
>> Textadept, I think this is well worth the tradeoff. Personally I don't
>> think either Lua patterns or Scintilla's not-actually-regular-expressions
>> are
>> good enough for a programmer's editor. From reading the description of
>> TRE
>> (no other experience) it seems to be the right kind of RE engine for TA
>> (complete and efficient).
>>
>> > Also, if Regex wins, I'll likely be removing the Lua code execution
>> > in pattern replacements (e.g. `%(string.upper('%1')`). In the very
>> > few instances I've actually used it, it's not as reliable as I'd
>> > expect it to be.
>>
>> I've never used this, but then I don't use Textadept's search UI at all...
>>
>> > I'd appreciate your thoughts and comments on this very much.
>>
>> If this happens I'm personally all that interested in the UI end of it,
>> but more the API. The things I'm likely to want to use it for:
>>
>> * search for next match
>> * find all non-overlapping matches
>> * highlight all matches
>> * match against one line (including returning captures) for implementing
>> the vi "s/(.*)-(.*)/\2_\1/" type of operation. If compiling the regex
>> isn't very fast I'd ideally want to be able to re-use the same compiled
>> regex each time.
>>
>> I'm not saying the above should all be provided directly - as long as
>> the right primitives are available to Lua I'm happy. (That's why I use
>> Textadept in the first place! :-) )
>>
>> Thanks,
>>
>> Chris
>> --
>> 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.
>>
>>

-- 
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 04 Jul 2016 - 01:30:52 EDT

This archive was generated by hypermail 2.2.0 : Mon 04 Jul 2016 - 06:42:37 EDT