Define prefix commands for all prefixes
This commit is contained in:
parent
a2f2f3ab6f
commit
2df606bb68
|
@ -15,6 +15,10 @@ which require an initialization must be listed explicitly in the list.")
|
||||||
:init
|
:init
|
||||||
(progn
|
(progn
|
||||||
(persp-mode t)
|
(persp-mode t)
|
||||||
|
(define-prefix-command 'perspectives-prefix)
|
||||||
|
(evil-leader/set-key "P" 'perspectives-prefix)
|
||||||
|
(define-prefix-command 'perspectives-custom-prefix)
|
||||||
|
(evil-leader/set-key "Po" 'perspectives-custom-prefix)
|
||||||
(evil-leader/set-key
|
(evil-leader/set-key
|
||||||
"Ps" 'persp-switch
|
"Ps" 'persp-switch
|
||||||
"Pk" 'persp-remove-buffer
|
"Pk" 'persp-remove-buffer
|
||||||
|
|
|
@ -672,6 +672,44 @@ determine the state to enable when escaping from the insert state.")
|
||||||
(setq evil-leader/in-all-states t
|
(setq evil-leader/in-all-states t
|
||||||
evil-leader/leader "SPC"
|
evil-leader/leader "SPC"
|
||||||
evil-leader/non-normal-prefix "s-")
|
evil-leader/non-normal-prefix "s-")
|
||||||
|
;; give name to spacemacs prefixes
|
||||||
|
(dolist (x '(("a" . "applications")
|
||||||
|
("as" . "applications-shells")
|
||||||
|
("b" . "buffers")
|
||||||
|
("bm" . "buffers-move")
|
||||||
|
("c" . "comments")
|
||||||
|
("e" . "errors")
|
||||||
|
("f" . "files")
|
||||||
|
("fe" . "files-emacs/spacemacs")
|
||||||
|
("g" . "git/versions-control")
|
||||||
|
("gc" . "smeargle")
|
||||||
|
("h" . "helm/help/highlight")
|
||||||
|
("hd" . "help-describe")
|
||||||
|
("i" . "insert")
|
||||||
|
("j" . "join/split")
|
||||||
|
("n" . "narrow/numbers")
|
||||||
|
("p" . "projects")
|
||||||
|
("p4" . "perforce")
|
||||||
|
("r" . "registers/rings")
|
||||||
|
("s" . "search/symbol")
|
||||||
|
("sr" . "symbol-range")
|
||||||
|
("S" . "spelling")
|
||||||
|
("t" . "toggles")
|
||||||
|
("tm" . "toggles-modeline")
|
||||||
|
("w" . "windows")
|
||||||
|
("wp" . "windows-popup")
|
||||||
|
("ws" . "windows-size")
|
||||||
|
("x" . "text")
|
||||||
|
("xd" . "text-delete")
|
||||||
|
("xg" . "text-google-translate")
|
||||||
|
("xm" . "text-move")
|
||||||
|
("xt" . "text-transpose")
|
||||||
|
("xw" . "text-words")
|
||||||
|
("z" . "z")))
|
||||||
|
(let ((key (car x))
|
||||||
|
(prefix-command (intern (format "%s-prefix" (cdr x)))))
|
||||||
|
(define-prefix-command prefix-command)
|
||||||
|
(evil-leader/set-key key prefix-command)))
|
||||||
(global-evil-leader-mode))
|
(global-evil-leader-mode))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
|
|
Loading…
Reference in a new issue