- (general-evil-setup t)
-
- (general-override-mode)
-
- (general-create-definer
- ab--mode-leader-keys
- :keymaps 'override
- :states '(emacs normal visual motion insert)
- :non-normal-prefix "C-,"
- :prefix ",")
-
- (general-create-definer
- ab--leader-keys
- :keymaps 'override
- :states '(emacs normal visual motion insert)
- :non-normal-prefix "M-m"
- :prefix "SPC"))
-#+end_src
-
-*** evil
-
-#+begin_src emacs-lisp
-(use-package evil
- :demand t
- :hook (view-mode . evil-motion-state)
- :config (evil-mode 1))
-#+end_src
-
-#+begin_src emacs-lisp
-(use-package evil-escape
- :demand t
- :init
- (setq evil-escape-excluded-states '(normal visual multiedit emacs motion)
- evil-escape-excluded-major-modes '(neotree-mode)
- evil-escape-key-sequence "jk"
- evil-escape-delay 0.25)
- :general
- (:states '(insert replace visual operator)
- "C-g" #'evil-escape)
- :config
- (evil-escape-mode 1)
- ;; no `evil-escape' in minibuffer
- (push #'minibufferp evil-escape-inhibit-functions))
+ (push '((nil . "ryo:.*:") . (nil . "")) which-key-replacement-alist)
+ (ryo-modal-keys
+ ("," ryo-modal-repeat)
+ ("b" backward-char)
+ ("n" next-line)
+ ("p" previous-line)
+ ("f" forward-char)
+ ("a" move-beginning-of-line)
+ ("e" move-end-of-line)
+ ("SPC" (("b b" ibuffer-list-buffers)
+ ("b k" kill-this-buffer)
+ ("b o" other-window)
+ ("b s" save-buffer)
+ ("q q" save-buffers-kill-terminal)))
+ ("d" (("w" kill-word)
+ ("d" kill-whole-line)
+ ("b" backward-kill-word)))
+ ("c" (("w" kill-word :exit t)
+ ("c" kill-whole-line :exit t))))
+
+ (ryo-modal-keys
+ ;; First argyment to ryo-modal-keys may be a list of keywords.
+ ;; These keywords will be applied to all keybindings.
+ (:norepeat t)
+ ("0" "M-0")
+ ("1" "M-1")
+ ("2" "M-2")
+ ("3" "M-3")
+ ("4" "M-4")
+ ("5" "M-5")
+ ("6" "M-6")
+ ("7" "M-7")
+ ("8" "M-8")
+ ("9" "M-9"))
+ :hook ((text-mode . ryo-modal-mode)
+ (prog-mode . ryo-modal-mode)))