[Pharo-project] [ANN]: Vim Shortcuts for Nautilus (Proof-of-concept)

Guillermo Polito guillermopolito at gmail.com
Mon Jul 9 04:57:01 EDT 2012


On Sun, Jul 8, 2012 at 2:52 PM, Sean P. DeNigris <sean at clipperadams.com>wrote:

>
> Benjamin Van Ryseghem-2 wrote
> >
> > If I were you, I would have put all the VIM shortcut in one class,
> instead
> > of putting them around but :)
> >
> I'll keep that in mind once I get it working ;-)
>
>
> Benjamin Van Ryseghem-2 wrote
> >
> > Like that, you could add yours in a specific context, and remove them.
> >
> Any luck finding those detach* methods? Googling/Nabbling
> "detachKeymapCategory" turned up nothing.
>
> Also, I think of my use case here for the "enter command mode" shortcut as
> "Change the default shortcuts for a Morph class". It seems that what's
> required for this type of use is a registration mechanism more like the
> world menu. For the world menu, I can insert an entry at any level, not
> just
> an existing one, without overriding anything. In KM currently, in order to
> do this, it seems we're forced to hitch a ride on an existing category.
> Maybe a special pragma indicating that certain categories should be
> attached
> for the class by default.
>
> In summary, I'm still unclear on the relationship between the class-side
> <keymap> defaults methods and changing shortcuts on the fly, but what seems
> to be missing are:
> * a way to register shortcuts/categories to be attached to a Morph class by
> default
>

Nope :).  Look at http://www.smalltalkhub.com/mc/Guille/Keymappings/main,
in Keymapping-Morphic, KMWindowsKeymaps class>>buildGlobalKeymappingsOn:.
The last line:

    aBuilder attachShortcutCategory: #Window to: SystemWindow.

Those are static keybindings, and they were the first ones. I think I have
to spend some hours in providing examples...


> * a way to detach categories
>

I'll integrate them again.  Ben, somehow the dettach* methods dissapeared
from KMDispatcher in latest 2.0 :/. I'll have a look and integrate all of
them in latest Keymapping version.


> * a way to detach individual shortcuts
>

You mean removing a shortcut from a category? Or to ban a shortcut from a
morph? Because here, I will be a bit strict with the nomenclature so we
understand each other :) :

- Static category keymappings: you attach a category to a class. ( The one
in the example above )
- Dynamic category keymappings: you attach dinamically a category to an
object. (the one you've used so far)
- Dynamic object keymappings: you attach a single shortcut to an object,
sending the #on:do: message

So, were you using the third one? Removing a keymap from a category, which
removes it from all the objects who use it, is easy but removing just for
one object is not there, because the keymaps are looked up in the
configuration, not flattened on the object.


> Thanks, this is very exciting. We're *so* close to having this work...
> Sean
>
> --
> View this message in context:
> http://forum.world.st/ANN-Vim-Shortcuts-for-Nautilus-Proof-of-concept-tp4638987p4639088.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20120709/001b9378/attachment-0001.html>


More information about the Pharo-dev mailing list