[Geany] Regex replace weirdness
Lex Trotman
elextr at xxxxx
Wed Sep 29 22:53:27 UTC 2010
On 30 September 2010 01:32, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:
> On Wed, 29 Sep 2010 16:20:33 +1000
> Lex Trotman <elextr at gmail.com> wrote:
>
>> >> Perhaps, as you say, it should offer a substitute command that works
>> >> line by line as well, but "someone has to do it" (tm) and "patches are
>> >> welcome" (tm) (that right Frank ;-).
>> >
>> > Thats a better answer than your previous one :-).
>>
>> Oh, there is rarely any objection to contributions, that goes without saying.
>>
>> I was noting that the current behavior is not a bug (since it behaves
>> as specified) so it doesn't have to be fixed. nor is a change in
>> behavior necessary (since there is a workaround to the rare "problem")
>> so it doesn't have to be fixed. With limited resources there are far
>> more important things to think about.
>
> Personally I think we shouldn't rematch a replaced start of line. I
> think this is counter intuitive. Is there a reason why the current
> behaviour is better?
>
> Anyway, the reason it works as it does was because that was easier to
> implement.
Yes I understood that, as I said the alternative is to implement the
"find all and replacel" by proper substitute function which finds the
occurrences first then substitutes them. I guess if you can do the
internal equivalent of the find all and mark command then just
substitute all marked. Actually it'd be nice to have an option for the
replacements to be highlighted so I could see the places it made
changes I didn't mean (does that often happen to you with change all??
:-)
I still just don't know if its worth the effort.
>
>> I personally don't care if someone changes it (although I think that
>> going back to line by line operation is a step back into the time when
>> whole files would not fit in memory, ah hey lets bring back Teco ;-).
>
> Not sure anyone's proposing preventing matching past a line.
I was just commenting on how vim does it (and sed) , but thats not the
way Geany should do it. see above.
Cheers
Lex
>
> Regards,
> Nick
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>
More information about the Users
mailing list