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

From: DrTebi <drtebi.att.gmail.com>
Date: Sat, 2 Jul 2016 22:15:07 -0700

Hi Mitchell,

personally, I prefer regex patterns. And I admit, I pretty much don't
even know how Lua patterns work in the first place.

I use Textadept for pretty much everything except my larger Python
projects, but I don't work much with the Lua language itself, which
explains my limited knowledge of Lua patterns.

So obviously, I would preferr regex, which I have used since the late
90s.. But if I would get more into Lua, I would probably appreciate to
see the option to use Lua patterns... so my vote goes for both.

Would it not be possible to have a radio group with "Lua Pattern -
Regex Pattern - Plain Text"?

I really wouldn't mind if Textadept would get a bit larger in file
size due to this option.

But that's just my opinion... others may think differently ☺

On Sat, Jul 2, 2016 at 9:06 PM, Giovanni Salmeri
<g.salmeri.att.mondodomani.org> wrote:
> Dear Mitchell
>
> I for myself use a modified version of
> http://foicica.com/wiki/regex-searches/file/regex-find.lua, so I would
> welcome very much a regex engine in Textadept. In my opinion the
> problem with Lua patterns is not the fact that they are limited (the
> regex engine of Scintilla I use is much more limited), but simply the
> fact that they are different from anything else I use (except,
> obviously, Lua scripts themselves).
>
> On a side note: I modified the above script in order to allow
> substitutions like s/^/x/g or s/$/x/g (for adding x at the beginning or
> at the end of a line), which is something I consider almost essential
> but that I have found rather tricky to implement. Would the new solution
> you are proposing allow this?
>
>> 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.
>
> The same for me, with this syntax I managed more than once to stall
> Textadept. On the other side, I would miss for example exactly
> string.upper and string.lower, considering that TRE lacks the Vim-like
> syntax \l \u \L \U \E. Perhaps Lua code execution could be kept as
> a non-documented feature for the adventurous?
>
> Thank you for your magnificent work!
>
> Giovanni
>
> --
> Giovanni Salmeri
> http://mondodomani.org/pers/salmeri/
> --
> 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.
>

-- 
"The bitterness of poor quality remains long after the sweetness of
low price is forgotten."
-- 
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 Sun 03 Jul 2016 - 01:15:07 EDT

This archive was generated by hypermail 2.2.0 : Sun 03 Jul 2016 - 06:53:02 EDT