[implementations-list] Early implementation of new VIM-like mode

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Thu Jul 2 15:27:24 CEST 2009


Hi,

I want to add something to my last mail.  I think the 'modes' of modal 
editing are not the problem when implementing modal-editing in emacs - 
emacs does already have modes (minor- and major-modes) which can be 
enabled and disabled.  The only problem are the keymaps.  The 
emacs-keymaps don't provide an easy way to parse commands as desired 
(as vim does).  So the only important part to be implemented IS the 
parsing of input commands.

I pushed some new patches to vim-mode's repository which move (almost) 
all vim-specific components out of vim-keys.el and vim-nodes.el to 
vim-vim.el.  Now the first both files could already provide a simple 
framework to get vim-like keymaps.  The main point is that it's now 
possible to call a function when an arbitrary node of the keymap-tree 
is traversed, i.e. not only on the leaf nodes but also on the inner 
nodes.  Vim-specific parts of commands, like counts or registers, can 
be easily implemented by tagging an appropriate function to the nodes 
of the keymaps (by this approach it is of course possible to manipulate 
and redirect the parsing process on inner nodes).

Everything else, like the composition of commands and motions, the 
implementation of commands and even activation and deactivation of 
modes is not part of the keymap-stuff.

Frank



More information about the implementations-list mailing list