[Qt-creator] feature request: smart replace

Serge Ratke dev.serge.ratke at gmx.de
Wed Jan 21 22:58:54 CET 2009


well, there you go,

here's the patch which implements smart replace :)

the behaviour is quite simple,

search for "foo" and replace it with "bar", so

Foo is replaced with Bar, foo is replace with bar, and FOO is replaced with BAR. in other 
cases, such as camelcase the replace method behaves as it used to in the past.

enjoy

Am Mittwoch, 7. Januar 2009 22:24:29 schrieb Serge Ratke:
> hi devs,
>
> it'd be nice if the text replace method would become somewhat smarter in a
> way i'll describe below :)
>
> let's say you're searching for "foo", now there are several matches in the
> document:
>
> #define FOO_H
>
> class Foo {
> 	Foo *foo;
> };
>
> so you see the same string with alternating upper-/lowercase. now if i'd
> say to replace the string "foo" with the string "bar" i'd like to see the
> following:
>
> #define BAR_H
>
> class Bar {
> 	Bar *bar;
> };
>
> notice how the upper-/lowercase is preserved!
>
> greetings

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartreplace.diff
Type: text/x-patch
Size: 2928 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090121/76041771/attachment.bin 


More information about the Qt-creator-old mailing list