Emacs - error: key sequence

I am getting errors when I try to add this to my ~ / .emacs file:

(define-key evil-normal-state-map "ss" 'split-window-vertically)

      

I am getting this error:

error: key sequence starts with non-prefix key s

+3


source to share


1 answer


The problem is that there is already a command tied to s

(in particular evil-substitute

), which means you would not be able to bind to you ss

because the first one s

would invoke evil-substitute

. You can disable s

by setting it to nil

, and then bind ss

like you already did:

(define-key evil-normal-state-map "s" nil)
(define-key evil-normal-state-map "ss" 'split-window-vertically)

      



(If you want to know what commands are associated with these keys, you can use M-x describe-key SOMEKEY

or C-h k SOMEKEY

.)

+4


source







All Articles