On Wed, Aug 3, 2016 at 8:05 PM, Esteban Lorenzano <esteba...@gmail.com> wrote:
>
>> On 03 Aug 2016, at 13:47, Cyril Ferlicot Delbecque 
>> <cyril.ferli...@gmail.com> wrote:
>>
>>
>>
>> On 03/08/2016 10:56, Ben Coman wrote:
>>> I would guess code expansions could be many and varied between
>>> different individuals, and quickly consume available keyboard
>>> shortcuts.  Perhaps a generic mechanism would be single shortcut for
>>> "code expansion" which processes the letters preceding the cursor.
>>> For example, using shortcut <ctrl-e> for code expansion and typing...
>>>
>>> itf<ctrl-e>
>>>
>>> ==>   ifTrue: [ ] ifFalse: [ ]
>>>
>>> The could be an interface to define these code expansions - initially
>>> at least on a purely personal basis.
>>>
>>>> And this is not really for adding a new feature. This shortcut already 
>>>> (always :) ) existed
>>>
>>> With a single shortcut for code expansion, perhaps a few other
>>> existing combinations could be freed up.
>>>
>>> cheers -ben
>>>
>>
>> This would be really cool :)
>> If everyone agree, let's open an issue.
>>
>> There is this kind of things in JetBrains Tools but with autocompletion
>> instead of shortcut. You have some expression that make pop the
>> autocompletion dialog to change it on piece of code.
>>
>> For example in Intellij you can type "sout" and the autocompletion will
>> propose "System.out.println()”.
>
> exactly… we even have the algorithm implemented for this.
> I insist I would enhance ocompletion instead of adding an expansion shortcut.

So maybe the shortcut just provides the completion engine an extra hint.
Or maybe the expansion could be invoked by a special key series like a
double-colon ::
(if double-colon has no other special meaning, since single colons are
already associated with keyword messages).
For example typing
itf::
==>  ifTrue:  ifFalse:

cheers -ben

Reply via email to