Re: Vim Keys?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
40 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Goubier Thierry
Le 29/11/2012 20:52, ☈king a écrit :
> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
> a way to make Pharo have vi-keys (or even better, vim-keys)?
>
> Thanks!
> —☈

It's underway. The infrastructure is moving to a better (unified) way of
specifying and handling shortcuts, and then vi and vim-keys and emacs
and others should become available.

Bad point: I should help with that effort, but given my deadlines for
the end of the year, not sure I'll be of much help :(.

Thierry
--
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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

senTalker
When we are at it... how do shortcuts in Pharo 2 currently work?

In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
Class", but it has no effect in Pharo 2.

2012/11/30 Goubier Thierry <[hidden email]>:

> Le 29/11/2012 20:52, ☈king a écrit :
>
>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>
>> Thanks!
>> —☈
>
>
> It's underway. The infrastructure is moving to a better (unified) way of
> specifying and handling shortcuts, and then vi and vim-keys and emacs and
> others should become available.
>
> Bad point: I should help with that effort, but given my deadlines for the
> end of the year, not sure I'll be of much help :(.
>
> Thierry
> --
> 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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Goubier Thierry
Le 30/11/2012 09:57, Sebastian Nozzi a écrit :
> When we are at it... how do shortcuts in Pharo 2 currently work?

Ouch. I can describe what I know about key event processing, and maybe
you will understand what's happening. It will be a good exercise for me
to see if I got that stuff right.

 From first to process to last to process, once the key event is
generated and given to the Morph which has the focus:

1 - The morph keymapping dispatch.
     This one is multilevel in nature. Here, so it goes (simplified, I'm
not listing where platform differences are taken in account). The key
event is matched against shortcuts defined in keymaps (and a partial
match is possible if it is a multi-key shortcut).
1.1 - Direct keymapping : shortcuts added by on: do: to the KMDispatcher
of the Morph instance.
1.2 - Named keymaps. Keymaps defined elsewhere and attached to that
morph keymap dispatcher.
1.3 - Global named keymaps. Keymaps associated with the morph Class or
one of it's superclass (i.e. a Morph class global keymap will apply to
all morphs).
1.4 - If no match, go to 1.1 with the owner of the morph and repeat. Do
that until you reach the World (Pharo top-level window). There, if
keymapping hasn't matched, go to 2.

2 - The morph keyStroke: handling. Normal keys, navigation keys,
hardcoded shortcuts (TextMorph for example).
-- In some cases (some! No, often :(!) keystrokes are sent to other
objects or Morphs: navigation, shortcuts, etc...

3 - The morph eventHandler : here a model can trap any key event or
shortcut.

If a match happen in any of those, the key event is usually said to be
processed and we go out of the processing loop (no more matches)

So, for a given shortcut being processed, it may be hard to find where
it has been caught. Only the Keymapping dispatch has a debugging feature
(with KMLog).

> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
> Class", but it has no effect in Pharo 2.

This one is easier. In Nautilus, there is a shortcut browser which lists
all the defined shortcuts. I believe that the find class is a multi-key
shortcut.

> 2012/11/30 Goubier Thierry <[hidden email]>:
>> Le 29/11/2012 20:52, ☈king a écrit :
>>
>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>>
>>> Thanks!
>>> —☈
>>
>>
>> It's underway. The infrastructure is moving to a better (unified) way of
>> specifying and handling shortcuts, and then vi and vim-keys and emacs and
>> others should become available.
>>
>> Bad point: I should help with that effort, but given my deadlines for the
>> end of the year, not sure I'll be of much help :(.
>>
>> Thierry
>> --
>> 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
>>
>
>
>


--
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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Benjamin Van Ryseghem (Pharo)

On Nov 30, 2012, at 10:25 AM, Goubier Thierry wrote:

> Le 30/11/2012 09:57, Sebastian Nozzi a écrit :
>> When we are at it... how do shortcuts in Pharo 2 currently work?
>
> Ouch. I can describe what I know about key event processing, and maybe you will understand what's happening. It will be a good exercise for me to see if I got that stuff right.
>
> From first to process to last to process, once the key event is generated and given to the Morph which has the focus:
>
> 1 - The morph keymapping dispatch.
>    This one is multilevel in nature. Here, so it goes (simplified, I'm not listing where platform differences are taken in account). The key event is matched against shortcuts defined in keymaps (and a partial match is possible if it is a multi-key shortcut).
> 1.1 - Direct keymapping : shortcuts added by on: do: to the KMDispatcher of the Morph instance.
> 1.2 - Named keymaps. Keymaps defined elsewhere and attached to that morph keymap dispatcher.
> 1.3 - Global named keymaps. Keymaps associated with the morph Class or one of it's superclass (i.e. a Morph class global keymap will apply to all morphs).
> 1.4 - If no match, go to 1.1 with the owner of the morph and repeat. Do that until you reach the World (Pharo top-level window). There, if keymapping hasn't matched, go to 2.
>
> 2 - The morph keyStroke: handling. Normal keys, navigation keys, hardcoded shortcuts (TextMorph for example).
> -- In some cases (some! No, often :(!) keystrokes are sent to other objects or Morphs: navigation, shortcuts, etc...
>
> 3 - The morph eventHandler : here a model can trap any key event or shortcut.
>
> If a match happen in any of those, the key event is usually said to be processed and we go out of the processing loop (no more matches)
>
> So, for a given shortcut being processed, it may be hard to find where it has been caught. Only the Keymapping dispatch has a debugging feature (with KMLog).
>
>> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
>> Class", but it has no effect in Pharo 2.
>
> This one is easier. In Nautilus, there is a shortcut browser which lists all the defined shortcuts. I believe that the find class is a multi-key shortcut.

Indeed , cmd+f,c

Ben
:)

>
>> 2012/11/30 Goubier Thierry <[hidden email]>:
>>> Le 29/11/2012 20:52, ☈king a écrit :
>>>
>>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>>>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>>>
>>>> Thanks!
>>>> —☈
>>>
>>>
>>> It's underway. The infrastructure is moving to a better (unified) way of
>>> specifying and handling shortcuts, and then vi and vim-keys and emacs and
>>> others should become available.
>>>
>>> Bad point: I should help with that effort, but given my deadlines for the
>>> end of the year, not sure I'll be of much help :(.
>>>
>>> Thierry
>>> --
>>> 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
>>>
>>
>>
>>
>
>
> --
> 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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

senTalker
Thanks for the whole information!
Actually I just wanted to know the key-combination (I expressed myself
wrong), but will keep this info for future reference.

2012/11/30 Benjamin <[hidden email]>:

>
> On Nov 30, 2012, at 10:25 AM, Goubier Thierry wrote:
>
>> Le 30/11/2012 09:57, Sebastian Nozzi a écrit :
>>> When we are at it... how do shortcuts in Pharo 2 currently work?
>>
>> Ouch. I can describe what I know about key event processing, and maybe you will understand what's happening. It will be a good exercise for me to see if I got that stuff right.
>>
>> From first to process to last to process, once the key event is generated and given to the Morph which has the focus:
>>
>> 1 - The morph keymapping dispatch.
>>    This one is multilevel in nature. Here, so it goes (simplified, I'm not listing where platform differences are taken in account). The key event is matched against shortcuts defined in keymaps (and a partial match is possible if it is a multi-key shortcut).
>> 1.1 - Direct keymapping : shortcuts added by on: do: to the KMDispatcher of the Morph instance.
>> 1.2 - Named keymaps. Keymaps defined elsewhere and attached to that morph keymap dispatcher.
>> 1.3 - Global named keymaps. Keymaps associated with the morph Class or one of it's superclass (i.e. a Morph class global keymap will apply to all morphs).
>> 1.4 - If no match, go to 1.1 with the owner of the morph and repeat. Do that until you reach the World (Pharo top-level window). There, if keymapping hasn't matched, go to 2.
>>
>> 2 - The morph keyStroke: handling. Normal keys, navigation keys, hardcoded shortcuts (TextMorph for example).
>> -- In some cases (some! No, often :(!) keystrokes are sent to other objects or Morphs: navigation, shortcuts, etc...
>>
>> 3 - The morph eventHandler : here a model can trap any key event or shortcut.
>>
>> If a match happen in any of those, the key event is usually said to be processed and we go out of the processing loop (no more matches)
>>
>> So, for a given shortcut being processed, it may be hard to find where it has been caught. Only the Keymapping dispatch has a debugging feature (with KMLog).
>>
>>> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
>>> Class", but it has no effect in Pharo 2.
>>
>> This one is easier. In Nautilus, there is a shortcut browser which lists all the defined shortcuts. I believe that the find class is a multi-key shortcut.
>
> Indeed , cmd+f,c
>
> Ben
> :)
>
>>
>>> 2012/11/30 Goubier Thierry <[hidden email]>:
>>>> Le 29/11/2012 20:52, ☈king a écrit :
>>>>
>>>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>>>>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>>>>
>>>>> Thanks!
>>>>> —☈
>>>>
>>>>
>>>> It's underway. The infrastructure is moving to a better (unified) way of
>>>> specifying and handling shortcuts, and then vi and vim-keys and emacs and
>>>> others should become available.
>>>>
>>>> Bad point: I should help with that effort, but given my deadlines for the
>>>> end of the year, not sure I'll be of much help :(.
>>>>
>>>> Thierry
>>>> --
>>>> 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
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> 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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Stéphane Ducasse
In reply to this post by senTalker

On Nov 30, 2012, at 9:57 AM, Sebastian Nozzi wrote:

> When we are at it... how do shortcuts in Pharo 2 currently work?
>
> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
> Class", but it has no effect in Pharo 2.

for now but we are discussing it :)
ctrl-f + ctrl c
        => find class

>
> 2012/11/30 Goubier Thierry <[hidden email]>:
>> Le 29/11/2012 20:52, ☈king a écrit :
>>
>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>>
>>> Thanks!
>>> —☈
>>
>>
>> It's underway. The infrastructure is moving to a better (unified) way of
>> specifying and handling shortcuts, and then vi and vim-keys and emacs and
>> others should become available.
>>
>> Bad point: I should help with that effort, but given my deadlines for the
>> end of the year, not sure I'll be of much help :(.
>>
>> Thierry
>> --
>> 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 | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Igor Stasenko
In reply to this post by senTalker
click on the top-right arrow in browser window and find "shortcuts
description" menu item.


On 30 November 2012 13:29, Sebastian Nozzi <[hidden email]> wrote:

> Thanks for the whole information!
> Actually I just wanted to know the key-combination (I expressed myself
> wrong), but will keep this info for future reference.
>
> 2012/11/30 Benjamin <[hidden email]>:
>>
>> On Nov 30, 2012, at 10:25 AM, Goubier Thierry wrote:
>>
>>> Le 30/11/2012 09:57, Sebastian Nozzi a écrit :
>>>> When we are at it... how do shortcuts in Pharo 2 currently work?
>>>
>>> Ouch. I can describe what I know about key event processing, and maybe you will understand what's happening. It will be a good exercise for me to see if I got that stuff right.
>>>
>>> From first to process to last to process, once the key event is generated and given to the Morph which has the focus:
>>>
>>> 1 - The morph keymapping dispatch.
>>>    This one is multilevel in nature. Here, so it goes (simplified, I'm not listing where platform differences are taken in account). The key event is matched against shortcuts defined in keymaps (and a partial match is possible if it is a multi-key shortcut).
>>> 1.1 - Direct keymapping : shortcuts added by on: do: to the KMDispatcher of the Morph instance.
>>> 1.2 - Named keymaps. Keymaps defined elsewhere and attached to that morph keymap dispatcher.
>>> 1.3 - Global named keymaps. Keymaps associated with the morph Class or one of it's superclass (i.e. a Morph class global keymap will apply to all morphs).
>>> 1.4 - If no match, go to 1.1 with the owner of the morph and repeat. Do that until you reach the World (Pharo top-level window). There, if keymapping hasn't matched, go to 2.
>>>
>>> 2 - The morph keyStroke: handling. Normal keys, navigation keys, hardcoded shortcuts (TextMorph for example).
>>> -- In some cases (some! No, often :(!) keystrokes are sent to other objects or Morphs: navigation, shortcuts, etc...
>>>
>>> 3 - The morph eventHandler : here a model can trap any key event or shortcut.
>>>
>>> If a match happen in any of those, the key event is usually said to be processed and we go out of the processing loop (no more matches)
>>>
>>> So, for a given shortcut being processed, it may be hard to find where it has been caught. Only the Keymapping dispatch has a debugging feature (with KMLog).
>>>
>>>> In Pharo 1.4, in the class browser, I used to hit Ctrl-F to open "Find
>>>> Class", but it has no effect in Pharo 2.
>>>
>>> This one is easier. In Nautilus, there is a shortcut browser which lists all the defined shortcuts. I believe that the find class is a multi-key shortcut.
>>
>> Indeed , cmd+f,c
>>
>> Ben
>> :)
>>
>>>
>>>> 2012/11/30 Goubier Thierry <[hidden email]>:
>>>>> Le 29/11/2012 20:52, ☈king a écrit :
>>>>>
>>>>>> Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
>>>>>> a way to make Pharo have vi-keys (or even better, vim-keys)?
>>>>>>
>>>>>> Thanks!
>>>>>> —☈
>>>>>
>>>>>
>>>>> It's underway. The infrastructure is moving to a better (unified) way of
>>>>> specifying and handling shortcuts, and then vi and vim-keys and emacs and
>>>>> others should become available.
>>>>>
>>>>> Bad point: I should help with that effort, but given my deadlines for the
>>>>> end of the year, not sure I'll be of much help :(.
>>>>>
>>>>> Thierry
>>>>> --
>>>>> 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
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> 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
>>>
>>
>>
>


--
Best regards,
Igor Stasenko.

Screen Shot 2012-11-30 at 2.51.56 PM.png (361K) Download Attachment
cbc
Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

cbc
In reply to this post by Goubier Thierry
There is a package (for an ancester of Pharo) that added VIM keys (and Emacs, apparently) to the editors at:
You may be able to load this in and it will work, or the code may have drifted quite a bit to the point where it just doesn't work anymore.  I have not tried using it for years, myself.

-Chris


On Thu, Nov 29, 2012 at 11:52 AM, ☈king <[hidden email]> wrote:
Hi all. I'm extremely new to Smalltalk, but I was wondering if there was
a way to make Pharo have vi-keys (or even better, vim-keys)?

Thanks!
—☈


Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

☈king
In reply to this post by Goubier Thierry
On 11/30/2012 02:15 AM, Goubier Thierry wrote:
> It's underway. The infrastructure is moving to a better (unified) way of
> specifying and handling shortcuts, and then vi and vim-keys and emacs
> and others should become available.

I have a radical question that I'd like to float.

What about making vi keys not only possible, but the *default* for Pharo?


They generally don't conflict with anything, because they're all
"Namespaced" under sequences that you hit Escape for. This means you
could continue to edit exactly as you do, but when you hit Esc you get
some bonus functionality.

And just because vi keys are the most hardcore interface ever of all
time, that doesn't mean it has to be for neckbeards-only. We could make
it so the text box has a status indicator, with help available and
everything. Imagine a bar at the bottom that says, "Vi Command Mode",
which can be clicked for a full help, then the rest of the bar has hints
about common commands. It could even be adaptive, like learn to tell you
commands that you haven't used much.

The same bar could also say "Stop this crazy feature I don't like it".

—☈

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Marcus Denker-4

On Nov 30, 2012, at 5:41 PM, ☈king <[hidden email]> wrote:

> On 11/30/2012 02:15 AM, Goubier Thierry wrote:
>> It's underway. The infrastructure is moving to a better (unified) way of
>> specifying and handling shortcuts, and then vi and vim-keys and emacs
>> and others should become available.
>
> I have a radical question that I'd like to float.
>
> What about making vi keys not only possible, but the *default* for Pharo?
>

I am sure the Emacs user will be violently against it.

Another thing is that I personally think that one of the things that Smalltalk
did very early is to not have modes for editing…

Are editing modes really something people want in 2012?

(and no, I am not a vi user. I know one vi command and that is esc : q !
to get out of there…)

        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

☈king
On 11/30/2012 10:48 AM, Marcus Denker wrote:
> I am sure the Emacs user will be violently against it.

Actually, that's the thing: Namespacing.

You could install vi keys on emacs and an emacs user would never notice
without hitting the Escape key.

Emacs keys, on the other hand, *do* conflict with existing Pharo bindings.

> Another thing is that I personally think that one of the things that Smalltalk
> did very early is to not have modes for editing…
>
> Are editing modes really something people want in 2012?

Think of modes as a monkey that sits by your keyboard.

Every time you bop him on the head (that is, you hit Escape), he
obediently reaches over and holds down a special keyboard modifier for
you, and continues to do so until you tell him to stop.

Since bopping him on the head takes no more time than hitting the
modifier key itself, hitting [Bop],[Key] is always going to be an
equally concise way of entering a string of commands compared to
chording [Modifier+Key]. But generally it's more concise, because you
tend to do big sequences of one or the other: edit a bunch, or input a
bunch. That is, in real life you do [Bop],[Key],[Key2],[Key],[Key3],
which is better than
[Modifier1+Key],[Modifier2+Key2],[Modifier1+Key],[Ctrl+Alt+Shift+Modifier+TurboDrive+Footpedal+☝+Key3]


The critical point is that users that don't enter command mode would
never be bothered by it. Users who do stumble upon it could get an
additional leg up with the help text, and they don't even really have to
know it's "Vi Keys", just that it's a non-chorded interface.

I know it's radical, but that's how we roll. (Right?)

—☈

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Igor Stasenko
In reply to this post by Marcus Denker-4
On 30 November 2012 17:48, Marcus Denker <[hidden email]> wrote:

>
> On Nov 30, 2012, at 5:41 PM, ☈king <[hidden email]> wrote:
>
>> On 11/30/2012 02:15 AM, Goubier Thierry wrote:
>>> It's underway. The infrastructure is moving to a better (unified) way of
>>> specifying and handling shortcuts, and then vi and vim-keys and emacs
>>> and others should become available.
>>
>> I have a radical question that I'd like to float.
>>
>> What about making vi keys not only possible, but the *default* for Pharo?
>>
>
> I am sure the Emacs user will be violently against it.
>
> Another thing is that I personally think that one of the things that Smalltalk
> did very early is to not have modes for editing…
>
> Are editing modes really something people want in 2012?
>
> (and no, I am not a vi user. I know one vi command and that is esc : q !
> to get out of there…)
>
i know a bit more. but that's my favorite :)

as to me, it is ok if pharo could have key bindings for anything, as
long as it does not interfere with my workflow
and does not forcing me to "do it right way".

>         Marcus



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Igor Stasenko
In reply to this post by ☈king
On 30 November 2012 18:23, ☈king <[hidden email]> wrote:

> On 11/30/2012 10:48 AM, Marcus Denker wrote:
>> I am sure the Emacs user will be violently against it.
>
> Actually, that's the thing: Namespacing.
>
> You could install vi keys on emacs and an emacs user would never notice
> without hitting the Escape key.
>
> Emacs keys, on the other hand, *do* conflict with existing Pharo bindings.
>
>> Another thing is that I personally think that one of the things that Smalltalk
>> did very early is to not have modes for editing…
>>
>> Are editing modes really something people want in 2012?
>
> Think of modes as a monkey that sits by your keyboard.
>
> Every time you bop him on the head (that is, you hit Escape), he
> obediently reaches over and holds down a special keyboard modifier for
> you, and continues to do so until you tell him to stop.
>
> Since bopping him on the head takes no more time than hitting the
> modifier key itself, hitting [Bop],[Key] is always going to be an
> equally concise way of entering a string of commands compared to
> chording [Modifier+Key]. But generally it's more concise, because you
> tend to do big sequences of one or the other: edit a bunch, or input a
> bunch. That is, in real life you do [Bop],[Key],[Key2],[Key],[Key3],
> which is better than
> [Modifier1+Key],[Modifier2+Key2],[Modifier1+Key],[Ctrl+Alt+Shift+Modifier+TurboDrive+Footpedal+☝+Key3]
>

well, what you explaining here is not just about handling keyboard
typing, but also
requires changes in UI (showing command line, black & white color
scheme, 80x25 text mode ;) ) etc..

i think, if vi would contest for "best obscure editor", i guess it
would get 1st prize.
i don't really care why you like it , just can you (or someone else)
explain me, why you think
it is best possible way of doing things?
Since i can't see it.

What exactly commands/shortcuts you wanna have there?
And wouldn't it be better to focus UI design towards avoiding the need
for shortcuts/modes alltogether?

Also, i going to repeat same over again: we don't need a full-fledged
text editor(s) in smalltalk IDE.
In smalltalk you will find yourself rarely need to edit more than 10
lines of code at time.
From that perspective, do you think it is wise to invest people's
energy into that?
I think it should be a call for those who miss it: if you want it - make it.

After all, you can run vi/emacs/<put your favorite> in separate window,
and can always copy-paste text between, and enjoy your lovely keyboard
shortcuts.

Sorry, maybe i miss something and don't see full picture,
but i really don't understand what is so cool in having vi/emacs
shortcuts in pharo..


>
> The critical point is that users that don't enter command mode would
> never be bothered by it. Users who do stumble upon it could get an
> additional leg up with the help text, and they don't even really have to
> know it's "Vi Keys", just that it's a non-chorded interface.
>
> I know it's radical, but that's how we roll. (Right?)
>
> —☈
>



--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

kilon
Even though I agree with your Igor , text editing is not per se required by existing smalltalk users, though even that is debatable, introducing vim and emacs mapping, in a completely optional state, will be definitely a motivation for vim and emacs user to join pharo. For example if you enter the pharo channel in irc you will be happy to find one person talking to himself, squeak channel more or less the same. Both #emacs and #vim show how popular both of these text editors are, why not pharo attract that crowd. Let me throw a crazy idea on the table why smalltalk cannot be a more ultimate text editor than those. Sure its ton of work and definetly you or I should not do , but I am sure if we provide minimum means of people to do this we will see more and more people porting vim and emacs features to pharo.

Also your point that we dont need text editing that much in pharo , is vaild from one side, however you should not forget that even though vim and emacs might appear radically diffirent from pharo those diffirences are skin deep. All of them have IDE tools , code navigation tools, debuging tools etc ... so I am not that convinced that for example using system browsers via shortcuts cannot be improved.

I am actually in the process of learning elisp code to port some of the features of emacs to pharo.



From: Igor Stasenko <[hidden email]>
To: [hidden email]
Sent: Friday, 30 November 2012, 20:13
Subject: Re: [Pharo-project] Vim Keys?

On 30 November 2012 18:23, ☈king <[hidden email]> wrote:

> On 11/30/2012 10:48 AM, Marcus Denker wrote:
>> I am sure the Emacs user will be violently against it.
>
> Actually, that's the thing: Namespacing.
>
> You could install vi keys on emacs and an emacs user would never notice
> without hitting the Escape key.
>
> Emacs keys, on the other hand, *do* conflict with existing Pharo bindings.
>
>> Another thing is that I personally think that one of the things that Smalltalk
>> did very early is to not have modes for editing…
>>
>> Are editing modes really something people want in 2012?
>
> Think of modes as a monkey that sits by your keyboard.
>
> Every time you bop him on the head (that is, you hit Escape), he
> obediently reaches over and holds down a special keyboard modifier for
> you, and continues to do so until you tell him to stop.
>
> Since bopping him on the head takes no more time than hitting the
> modifier key itself, hitting [Bop],[Key] is always going to be an
> equally concise way of entering a string of commands compared to
> chording [Modifier+Key]. But generally it's more concise, because you
> tend to do big sequences of one or the other: edit a bunch, or input a
> bunch. That is, in real life you do [Bop],[Key],[Key2],[Key],[Key3],
> which is better than
> [Modifier1+Key],[Modifier2+Key2],[Modifier1+Key],[Ctrl+Alt+Shift+Modifier+TurboDrive+Footpedal+☝+Key3]
>

well, what you explaining here is not just about handling keyboard
typing, but also
requires changes in UI (showing command line, black & white color
scheme, 80x25 text mode ;) ) etc..

i think, if vi would contest for "best obscure editor", i guess it
would get 1st prize.
i don't really care why you like it , just can you (or someone else)
explain me, why you think
it is best possible way of doing things?
Since i can't see it.

What exactly commands/shortcuts you wanna have there?
And wouldn't it be better to focus UI design towards avoiding the need
for shortcuts/modes alltogether?

Also, i going to repeat same over again: we don't need a full-fledged
text editor(s) in smalltalk IDE.
In smalltalk you will find yourself rarely need to edit more than 10
lines of code at time.
From that perspective, do you think it is wise to invest people's
energy into that?
I think it should be a call for those who miss it: if you want it - make it.

After all, you can run vi/emacs/<put your favorite> in separate window,
and can always copy-paste text between, and enjoy your lovely keyboard
shortcuts.

Sorry, maybe i miss something and don't see full picture,
but i really don't understand what is so cool in having vi/emacs
shortcuts in pharo..


>
> The critical point is that users that don't enter command mode would
> never be bothered by it. Users who do stumble upon it could get an
> additional leg up with the help text, and they don't even really have to
> know it's "Vi Keys", just that it's a non-chorded interface.
>
> I know it's radical, but that's how we roll. (Right?)
>
> —☈
>



--
Best regards,
Igor Stasenko.



Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Peter Hugosson-Miller
In reply to this post by Igor Stasenko
+1

--
Cheers,
Peter.

On 30 nov 2012, at 19:13, Igor Stasenko <[hidden email]> wrote:

> On 30 November 2012 18:23, ☈king <[hidden email]> wrote:
>> On 11/30/2012 10:48 AM, Marcus Denker wrote:
>>> I am sure the Emacs user will be violently against it.
>>
>> Actually, that's the thing: Namespacing.
>>
>> You could install vi keys on emacs and an emacs user would never notice
>> without hitting the Escape key.
>>
>> Emacs keys, on the other hand, *do* conflict with existing Pharo bindings.
>>
>>> Another thing is that I personally think that one of the things that Smalltalk
>>> did very early is to not have modes for editing…
>>>
>>> Are editing modes really something people want in 2012?
>>
>> Think of modes as a monkey that sits by your keyboard.
>>
>> Every time you bop him on the head (that is, you hit Escape), he
>> obediently reaches over and holds down a special keyboard modifier for
>> you, and continues to do so until you tell him to stop.
>>
>> Since bopping him on the head takes no more time than hitting the
>> modifier key itself, hitting [Bop],[Key] is always going to be an
>> equally concise way of entering a string of commands compared to
>> chording [Modifier+Key]. But generally it's more concise, because you
>> tend to do big sequences of one or the other: edit a bunch, or input a
>> bunch. That is, in real life you do [Bop],[Key],[Key2],[Key],[Key3],
>> which is better than
>> [Modifier1+Key],[Modifier2+Key2],[Modifier1+Key],[Ctrl+Alt+Shift+Modifier+TurboDrive+Footpedal+☝+Key3]
>>
>
> well, what you explaining here is not just about handling keyboard
> typing, but also
> requires changes in UI (showing command line, black & white color
> scheme, 80x25 text mode ;) ) etc..
>
> i think, if vi would contest for "best obscure editor", i guess it
> would get 1st prize.
> i don't really care why you like it , just can you (or someone else)
> explain me, why you think
> it is best possible way of doing things?
> Since i can't see it.
>
> What exactly commands/shortcuts you wanna have there?
> And wouldn't it be better to focus UI design towards avoiding the need
> for shortcuts/modes alltogether?
>
> Also, i going to repeat same over again: we don't need a full-fledged
> text editor(s) in smalltalk IDE.
> In smalltalk you will find yourself rarely need to edit more than 10
> lines of code at time.
> From that perspective, do you think it is wise to invest people's
> energy into that?
> I think it should be a call for those who miss it: if you want it - make it.
>
> After all, you can run vi/emacs/<put your favorite> in separate window,
> and can always copy-paste text between, and enjoy your lovely keyboard
> shortcuts.
>
> Sorry, maybe i miss something and don't see full picture,
> but i really don't understand what is so cool in having vi/emacs
> shortcuts in pharo..
>
>
>>
>> The critical point is that users that don't enter command mode would
>> never be bothered by it. Users who do stumble upon it could get an
>> additional leg up with the help text, and they don't even really have to
>> know it's "Vi Keys", just that it's a non-chorded interface.
>>
>> I know it's radical, but that's how we roll. (Right?)
>>
>> —☈
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

☈king
In reply to this post by kilon
On 11/30/2012 01:25 PM, dimitris chloupis wrote:
> Both #emacs and #vim show how popular both of these text editors are,
> why not pharo attract that crowd.

Another part of this is just making UIs for editing non-Smalltalk code.

If I had a good editor widget available, I could use it to make any
number of powerful other tools.

—☈

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

☈king
In reply to this post by Igor Stasenko
On 11/30/2012 12:13 PM, Igor Stasenko wrote:
> well, what you explaining here is not just about handling keyboard
> typing, but also
> requires changes in UI (showing command line, black & white color
> scheme, 80x25 text mode ;) ) etc..

I know you're joking, but limiting one's self to 80 columns is generally
a good way to maximize screen space. Step back and look at code that
runs with really long lines, and you'll see a vast emptiness on most lines.

> i think, if vi would contest for "best obscure editor", i guess it
> would get 1st prize. i don't really care why you like it , just can you
> (or someone else) explain me, why you think it is best possible way of
> doing things? Since i can't see it.

Monkey-bopping not a compelling argument?

I mean, the goal is to make a fluid interface. The subtitle of one of
the vim books is "Edit at the Speed of Thought". That's the key thing.
When I'm coding with vi keys, the text just goes where I want it, and
quickly, with very little stopping to think about it.

> What exactly commands/shortcuts you wanna have there?
> And wouldn't it be better to focus UI design towards avoiding the need
> for shortcuts/modes alltogether?

Possibly. I'll think about that.

> After all, you can run vi/emacs/<put your favorite> in separate window,
> and can always copy-paste text between, and enjoy your lovely keyboard
> shortcuts.

This is something that Pentadactyl (a amazing Firefox plugin that makes
the browser vim-like) does. You can hit Ctrl+i on any text field, and it
pops up a gvim window with that text.  Perhaps something like this is
sufficient.

We'll see. My problem right now is that I have dozens of projects that
steal my free time from getting into Smalltalk, but I'll fix that as
soon as I can.

—☈


Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Igor Stasenko
In reply to this post by kilon
On 30 November 2012 20:25, dimitris chloupis <[hidden email]> wrote:

> Even though I agree with your Igor , text editing is not per se required by
> existing smalltalk users, though even that is debatable, introducing vim and
> emacs mapping, in a completely optional state, will be definitely a
> motivation for vim and emacs user to join pharo. For example if you enter
> the pharo channel in irc you will be happy to find one person talking to
> himself, squeak channel more or less the same. Both #emacs and #vim show how
> popular both of these text editors are, why not pharo attract that crowd.
> Let me throw a crazy idea on the table why smalltalk cannot be a more
> ultimate text editor than those. Sure its ton of work and definetly you or I
> should not do , but I am sure if we provide minimum means of people to do
> this we will see more and more people porting vim and emacs features to
> pharo.

i am not against it. I just a bit tired of seeing this recurring topic
appear again and again and no action.
Come on, people. Pharo is open-source project. If you need it so
badly, then do it. Don't wait till someone,
one day do it for you, and stop wasting time, repeating same arguments
over and over again, how good vi/emacs mappings are comparing to what
we having now.

>
> Also your point that we dont need text editing that much in pharo , is vaild
> from one side, however you should not forget that even though vim and emacs
> might appear radically diffirent from pharo those diffirences are skin deep.
> All of them have IDE tools , code navigation tools, debuging tools etc ...
> so I am not that convinced that for example using system browsers via
> shortcuts cannot be improved.
>
it can and should be improved. Absolutely. But pharo environment is
much more than text editing,
and so, asking if it can provide "vi mapping" to me sounds similar to
"can photoshop provide vi/emacs mapping" , i.e. makes no sense at all.

apart from this is implementing a full-fledged text editor/word processor:
 it is doable and been done before (like Sophie project did).
But this is completely orthogonal to IDE: i simply do not see how
shortcuts like making text "bold" or "italic"
could significantly improve my daily coding experience. For coding i
concerned about completely different things: code navigation, browser
etc..
And here is where shortcuts come in handy..
Now if someone tell me how
"senders of it" action shortcut (to browse senders of selector) which
i often using by pressing 'Cmd-n'
can be ton times more convenient to use, once we will use vi shortcut
for it (btw, what is default vi shortcut for such action?)... i am all
ears.


> I am actually in the process of learning elisp code to port some of the
> features of emacs to pharo.
>


--
Best regards,
Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Sven Van Caekenberghe-2

On 30 Nov 2012, at 23:06, Igor Stasenko <[hidden email]> wrote:

> And here is where shortcuts come in handy..

Igor, you are not even using Command-Enter to search for classes/methods last time we sat together… ;-)

Like Command-Click on Class/method names, so cool and technically not keyboard shortcuts !

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill




Reply | Threaded
Open this post in threaded view
|

Re: Vim Keys?

Igor Stasenko
In reply to this post by ☈king
On 30 November 2012 22:16, ☈king <[hidden email]> wrote:
> On 11/30/2012 01:25 PM, dimitris chloupis wrote:
>> Both #emacs and #vim show how popular both of these text editors are,
>> why not pharo attract that crowd.
>
> Another part of this is just making UIs for editing non-Smalltalk code.
>
> If I had a good editor widget available, I could use it to make any
> number of powerful other tools.
>

But then you started from wrong end, isn't?
You're free to implement own full blown text editor using smalltalk,
as well as any other language.
with any shortcuts you may like.. but you trying to sell it as "vi
shortcuts for pharo".. which a bit strange.

Because what is not clear to me, is where is the gain concretely for
Pharo IDE and its tools.

And don't take me wrong: i would be happy to have good rich-text
editor widget with
configurable shortcuts.
But i just see key thing: it does not looks like absolute necessity to
me (as for smalltalk developer).
And if i would be a book writer or html "writer" you may get different opinion.
But that's the point: there's already tons of text editors specialized
for anything (but smalltalk).. which you can use right now, without
need to wait till someone will implement it.
So, why not use them?

> —☈
>



--
Best regards,
Igor Stasenko.

12