[implementations-list] Early implementation of new VIM-like mode
Frank Fischer
frank.fischer at mathematik.tu-chemnitz.de
Wed Jul 1 21:19:03 CEST 2009
On Wed, Jul 01, 2009 at 08:15:21PM +0200, Alessandro Piras wrote:
> Follow up: the most interesting thing about your approach is that you don't
> use emacs keymaps.
> Could you explain me how it works (a short summary is ok) ?
A simple keymap catching all events is installed (the keymap of the
minor mode 'vim-key-mode'). When an event comes in the function
vim:handle-key is called. This function does some housekeeping and
calls the function vim:input-key which is the entry point for
vim-mode's own keymap. If the event can't be handled by vim:input-key,
it's pushed back to unread-command-events, the keymap of vim-key-mode is
disabled and the event can be processed by Emacs as usual.
Btw, keymaps of vim-mode are very similar to emacs-keymaps but contain
more meta-information. But the general structure is the same.
Therefore, in theory all emacs-events could be handled by
vim-mode-keymaps, not only keyboard-events.
I know, the documentation is poor at this time, I'll try to improve it
soon :)
Bye,
Frank
More information about the implementations-list
mailing list