guix: revamped via read-only bindings

This commit is contained in:
condy 2020-11-14 20:54:48 +08:00 committed by Pierre Neidhardt
parent 9d7b7ac266
commit 18644e050c
1 changed files with 4 additions and 14 deletions

View File

@ -47,7 +47,7 @@
(defmacro evil-collection-guix-set (map) (defmacro evil-collection-guix-set (map)
"Set common bindings in MAP." "Set common bindings in MAP."
`(progn `(progn
(evil-collection-inhibit-insert-state ',map) (evil-collection-set-readonly-bindings ',map)
(evil-collection-define-key 'normal ',map (evil-collection-define-key 'normal ',map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
@ -78,12 +78,7 @@
"gR" 'bui-redisplay "gR" 'bui-redisplay
;; repl ;; repl
"gz" 'guix-switch-to-repl "gz" 'guix-switch-to-repl)))
;; quit
"q" 'quit-window
"ZQ" 'evil-quit
"ZZ" 'quit-window)))
;;;###autoload ;;;###autoload
(defun evil-collection-guix-setup () (defun evil-collection-guix-setup ()
@ -187,7 +182,7 @@
(evil-collection-guix-set guix-hydra-build-info-mode-map) (evil-collection-guix-set guix-hydra-build-info-mode-map)
(evil-collection-inhibit-insert-state 'guix-build-log-mode-map) (evil-collection-set-readonly-bindings 'guix-build-log-mode-map)
(evil-collection-define-key 'normal 'guix-build-log-mode-map (evil-collection-define-key 'normal 'guix-build-log-mode-map
;; motion ;; motion
(kbd "SPC") 'scroll-up-command (kbd "SPC") 'scroll-up-command
@ -205,12 +200,7 @@
"gr" 'revert-buffer "gr" 'revert-buffer
;; repl ;; repl
"gz" 'guix-switch-to-repl ; TODO: Does it still make sense here? "gz" 'guix-switch-to-repl)
;; quit
"q" 'quit-window
"ZQ" 'evil-quit
"ZZ" 'quit-window)
(evil-collection-guix-set guix-service-list-mode-map) (evil-collection-guix-set guix-service-list-mode-map)
(evil-collection-define-key 'normal 'guix-service-list-mode-map (evil-collection-define-key 'normal 'guix-service-list-mode-map