[Pharo-project] [Seaside] Re: change n same words in browser with one action

Igor Stasenko siguctua at gmail.com
Sat Sep 29 15:08:25 EDT 2012

On 29 September 2012 10:17, Camillo Bruni <camillobruni at gmail.com> wrote:
> On 2012-09-29, at 10:04, Sabine Knöfel <sabine.knoefel at gmail.com> wrote:
>> I agree with Igor and want to add, that a newbie will not be disturbed by shortcuts and can use the dialogs. It is the normal way, if you learn a new system, you get to know one thing after the other and someday, you get to know the shortcuts and they help to work faster.
>> As you can see in the screenshot (left side), the feature is documented.
>> At the right side you can see, that it is not implemented ;.)
>> Perhaps it is possible to implement it in one of the next releases?
> I don't think replacements on a textual basis make much sense:
> 1. methods are only a few lines of code, thus limiting the usefulness
>    of such replacements
> 2. besides renaming temporaries, most renames should be applied to
>    other methods as well. For instance inst-var renames, or method renames..
> Though I would like to see on-the-fly variable renaming. For instance as
> soon as you start typing on the name of the variable definition it will
> automatically rewrite all the other accesses to that variable in the current
> method. But for that we need a decent AST-based text editor.
> So unless you are a pro-pharo-shortcut user, think about the time you
> loose otherwise by point-and-clicking with your mouse ;), a little search
> and replace dialog interaction won't add too much :)
no, Cami, with cmd-j you don't need to click and point.
you just keep pressing cmd-j till all old occurrences is replaced with
one which you over-typed.

but i agree, that this feature has limited use in smalltalk code,
knowing that most of methods is 1-liner
and, i would say, if you need such thing, most of the times it is a
sign that you violating DRY principle
somehow and should really think how to refactor your code, instead of
changing single variable name/expression 10 times.

> best
> cami

Best regards,
Igor Stasenko.

More information about the Pharo-dev mailing list