[Eric] Suggestion for search and replace

Detlev Offenbach detlev at die-offenbachs.de
Fri Jan 6 12:26:00 GMT 2012


Hi,

that function will be included in eric 4.5 and eric 5.2. Meanwhile you may get it from the source code repository.

Regards,
Detlev

Am 05.01.2012 um 15:48 schrieb Al Dunstan:

> On Thursday, January 05, 2012, Leonardo Giordani wrote:
>> Sometimes when replacing with regular expressions (especially with
>> groups) I'm not totally sure that my substitution will be correct.
>> 
>> With the current search and replace there is no easy way to know if it
>> went good since when hitting the replace button the selection jumps
>> immediately to the next match.
>> Even stopping the replace means that you have to search backwards the
>> last substitution, which is not simple if it went bad.
>> 
>> Could it be possible to preview the line as it will be after the
>> substitution? I mean something like copying the line in a temporary
>> buffer, perform the substitution on it and show above the current line,
>> with a colored background.
>> 
>> Thank you,
>> 
>> Leo
>> _______________________________________________
>> Eric mailing list
>> Eric at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/eric
> 
> Eclipse uses separate "Replace", "Replace/Find" and "Find" buttons.  If you 
> think it's going to do what you want just keep hitting "Replace/Find" but if 
> you're not sure hit "Replace" and inspect the changes, then hit "Find" to 
> advance to the next or hit "Quit" and undo the damage.
> 
> That might be easier than messing around with previews...
> 
> -- 
> Al Dunstan, Software Engineer
> OptiMetrics, Inc.
> 3115 Professional Drive
> Ann Arbor, MI  48104-5131
> 
> "There are two ways of constructing a software design.  One way is to
> make it so simple that there are obviously no deficiencies.  And the
> other way is to make it so complicated that there are no obvious
> deficiencies."
>            - C. A. R. Hoare
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric

Detlev Offenbach
detlev at die-offenbachs.de



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.riverbankcomputing.com/pipermail/eric/attachments/20120106/07fa1d60/attachment.pgp>


More information about the Eric mailing list