NEO and Evil

Frank Fischer frank-fischer at shadow-soft.de
Fri Mar 15 21:48:22 CET 2013


On 2013-03-09, Tempora Tempa <tempy_two at web.de> wrote:
> Hi all,
>
> I'm using the NEO keyboard layout, and i want to integrate it
> somehow with Evil. One case is to change the state bindings of the
> key 'r', because 'r' is assigned to 'k' on qwert(z|y). Currently i'm
> doing this by editing the global evil state maps directly:
>
> (define-key evil-normal-state-map "r" nil)
> (define-key evil-motion-state-map "r" 'evil-previous-line)

This is in fact the right way to do. Motion state bindings are, well,
motions that are available in normal, visual, operator and motion
state. That's why they are placed in their own map. Normal state
bindings are only available in normal state.

> [...]
> I think the neo-minor-mode solution would be the best way, but i
> don't know how to completely remove a keybinding from an evil state
> during such a mode.

I would not do this. I think the best way is to directly manipulate
the keymaps and not using a minor mode. You may write a function that
does this. Since neo is really different from qwertz, you may even
consider to start with fresh empty keymaps and install completely
customized bindings, i.e. start with (setq emacs-normal-state-map
(make-sparse-keymap)) and then add you keybindings (almost all
standard bindings are in `evil-maps.el`, I would probably just copy
this file and then create may own map.

Best regards,
Frank

btw: I do not use neo now, but I did a few year ago and not being able
to configure the bindings in viper was one of the motivations to start
vim-mode ;)





More information about the implementations-list mailing list