possible bug (or my mistake ;-)

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Fri Oct 14 13:46:45 CEST 2011


On Fri, Oct 14, 2011 at 12:04:43PM +0200, Félix Sipma wrote:
> Hi!
> 
> I also use "bépo" and I confirm this bug. In order to get it work I had
> to remap each "normal key" to "nil" before mapping it to a "motion key".
> 
> Ex:
> 
> (define-key evil-normal-state-map "c" nil)
> (define-key evil-motion-state-map "c" 'backward-char)

This is exactly what you have to do (right now). The problem is that
the key-bindings are in different keymaps. And it is important that
some keys may be bound in different keymaps, e.g., "i" is bound to
'evil-insert in evil-normal-state-map and to
'evil-inner-text-objects-map in evil-operator-state-map.

Perhaps another function which binds some keysequence in one map and
removes all active bindings in other maps may be convenient, something
like

(evil-remap evil-motion-state-map "c" 'backward-char 
	    :remove evil-normal-state-map)
	    
or the other way around

(evil-remap evil-motion-state-map "i" 'what-ever
	    :keep evil-operator-state-map)
	    
I have no idea what the best solution is.

Frank



More information about the implementations-list mailing list