What about doing it that way?

<Shift-enter>1500*1.25<Alt-i> ?

Like that, you keep the same shortcut and behavior everywhere, and you don't have to answer questions such as:

        Why typing :42<enter> doesn't work in a workspace?

Thierry

Le 25/03/2014 14:30, Sven Van Caekenberghe a écrit :
I had this idea:

https://pharo.fogbugz.com/f/cases/13128/Use-Spotlight-to-quickly-evaluate-and-inspect-short-expressions

now you can do

<shift-Enter>:42<Enter>

to inspect the magic number 42

<shift-Enter>:1500*1.25<Enter>

to quickly compute your 25% raise

<shift-Enter>:Float pi<Enter>

to see how many decimals you still remember

<shift-Enter>:ZnClient new get: 'http://zn.stfx.eu/zn/small.html'<Enter>

and so on.

The interaction with the completion menu is not 100% perfect, but pressing <Space> at 
the end before <Enter> solves that.

Feedback ?

Sven

PS: I know that many Smalltalk greybeards type everywhere to the same effect, 
and that is cool to, but it leaves around dirty windows. Opening a workspace 
for a single expression often is overkill. This feature is totally keyboard 
driven and very clean.

PS2: Yes it resembles Emacs' M-: (evaluate-expression), but Pharo is much 
cooler, right ;-)





--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95

Reply via email to