Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs - error: Key sequence

Tags:

emacs

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 get this error:

error: Key sequence s s starts with non-prefix key s

like image 782
dagda1 Avatar asked Apr 25 '26 23:04

dagda1


1 Answers

The problem is that there is already a command bound to s (specifically, evil-substitute), which means you could not get to you ss binding because the first s would invoke evil-substitute. You can undefine the s by setting it to nil and then bind ss as you already have it:

(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 bound to which keys, you can use M-x describe-key SOMEKEY or C-h k SOMEKEY.)

like image 127
Dan Avatar answered Apr 28 '26 15:04

Dan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!