-
Notifications
You must be signed in to change notification settings - Fork 234
Evil
Andy Stewart edited this page Aug 11, 2022
·
8 revisions
English | 简体中文
Enable with
(require 'eaf-evil)
(setq eaf-evil-leader-keymap spacemacs-cmds)
(define-key key-translation-map (kbd "SPC")
(lambda (prompt)
(if (derived-mode-p 'eaf-mode)
(pcase eaf--buffer-app-name
("browser" (if eaf-buffer-input-focus
(kbd "SPC")
(kbd eaf-evil-leader-key)))
("pdf-viewer" (kbd eaf-evil-leader-key))
("image-viewer" (kbd eaf-evil-leader-key))
(_ (kbd "SPC")))
(kbd "SPC"))))
Doom-emacs users
(require 'eaf-evil)
(define-key key-translation-map (kbd "SPC")
(lambda (prompt)
(if (derived-mode-p 'eaf-mode)
(pcase eaf--buffer-app-name
("browser" (if eaf-buffer-input-focus
(kbd "SPC")
(kbd eaf-evil-leader-key)))
("pdf-viewer" (kbd eaf-evil-leader-key))
("image-viewer" (kbd eaf-evil-leader-key))
(_ (kbd "SPC")))
(kbd "SPC"))))
eaf-evil
will dynamically rebind eaf keybindings so that evil-mode
works nicely in normal
state.