Use spacebind for keybaord macro key bindings
This commit is contained in:
parent
32f440f05a
commit
9685095454
|
@ -494,34 +494,6 @@
|
|||
(push '(("\\(.*\\)C-c C-d C-d" . "elisp-slime-nav-describe-elisp-thing-at-point") . t)
|
||||
which-key-replacement-alist)
|
||||
|
||||
;; macros
|
||||
(let ((kmacro-descriptions
|
||||
'(
|
||||
("kmacro-start-macro-or-insert-counter" . "run")
|
||||
("kmacro-end-or-call-macro" . "stop or run")
|
||||
("kmacro-add-counter" . "increment counter")
|
||||
("kmacro-insert-counter" . "insert counter")
|
||||
("kmacro-set-counter" . "set counter")
|
||||
("kmacro-set-format" . "format counter")
|
||||
("kmacro-bind-to-key" . "assign key")
|
||||
("kmacro-edit-macro-repeat" . "edit")
|
||||
("kmacro-edit-lossage" . "edit from lossage")
|
||||
("kmacro-name-last-macro" . "name last macro")
|
||||
("kmacro-to-register" . "write to register")
|
||||
("kmacro-step-edit-macro" . "step by step edit")
|
||||
("kmacro-view-ring-2nd" . "display head")
|
||||
("kmacro-delete-ring-head" . "delete head")
|
||||
("kmacro-call-ring-2nd-repeat" . "run 2nd in ring")
|
||||
("kmacro-cycle-ring-next" . "next")
|
||||
("kmacro-cycle-ring-previous" . "previous")
|
||||
("kmacro-swap-ring" . "swap first two")
|
||||
("kmacro-view-macro-repeat" . "view last macro"))))
|
||||
(dolist (d kmacro-descriptions)
|
||||
;; ensure the target matches the whole string
|
||||
(push (cons (cons "\\(.*\\)K" (concat "\\`" (car d) "\\'"))
|
||||
(cons nil (cdr d)))
|
||||
which-key-replacement-alist)))
|
||||
|
||||
(which-key-add-key-based-replacements
|
||||
dotspacemacs-leader-key '("root" . "Spacemacs root")
|
||||
dotspacemacs-emacs-leader-key '("root" . "Spacemacs root"))
|
||||
|
|
|
@ -61,10 +61,6 @@
|
|||
("kd" "delete")
|
||||
("kD" "delete-backward")
|
||||
("k`" "hybrid")
|
||||
("K" "macros")
|
||||
("Kc" "counter")
|
||||
("Ke" "edit")
|
||||
("Kr" "ring")
|
||||
("m" "major mode commands")
|
||||
("n" "narrow/numbers")
|
||||
("N" "navigation")
|
||||
|
@ -153,27 +149,32 @@
|
|||
;; shell command -------------------------------------------------------------
|
||||
(spacemacs/set-leader-keys "!" 'shell-command)
|
||||
;; kmacros --------------------------------------------------------------------
|
||||
(spacemacs/set-leader-keys
|
||||
"Kca" 'kmacro-add-counter
|
||||
"Kcc" 'kmacro-insert-counter
|
||||
"KcC" 'kmacro-set-counter
|
||||
"Kcf" 'kmacro-set-format
|
||||
"Keb" 'kmacro-bind-to-key
|
||||
"Kee" 'kmacro-edit-macro-repeat
|
||||
"Kel" 'kmacro-edit-lossage
|
||||
"Ken" 'kmacro-name-last-macro
|
||||
"Ker" 'kmacro-to-register
|
||||
"Kes" 'kmacro-step-edit-macro
|
||||
"Kk" 'kmacro-start-macro-or-insert-counter
|
||||
"KK" 'kmacro-end-or-call-macro
|
||||
"KrL" 'kmacro-view-ring-2nd
|
||||
"Krd" 'kmacro-delete-ring-head
|
||||
"Krl" 'kmacro-call-ring-2nd-repeat
|
||||
"Krn" 'kmacro-cycle-ring-next
|
||||
"Krp" 'kmacro-cycle-ring-previous
|
||||
"Krs" 'kmacro-swap-ring
|
||||
"Kv" 'kmacro-view-macro-repeat
|
||||
)
|
||||
(spacebind
|
||||
"Operations on rectangular selections of text."
|
||||
:global
|
||||
(("K" "Keyboard Macros"
|
||||
("c" "Counter"
|
||||
("a" kmacro-add-counter "Increment counter")
|
||||
("c" kmacro-insert-counter "Insert counter")
|
||||
("C" kmacro-set-counter "Set counter")
|
||||
("f" kmacro-set-format "Set display format"))
|
||||
("e" "Edit"
|
||||
("b" kmacro-bind-to-key "Assign key binding")
|
||||
("e" kmacro-edit-macro-repeat "Edit last macro")
|
||||
("l" kmacro-edit-lossage "Create macro from lossage")
|
||||
("n" kmacro-name-last-macro "Name last macro")
|
||||
("r" kmacro-to-register "Write macro to register")
|
||||
("s" kmacro-step-edit-macro "Step by step edit"))
|
||||
("k" kmacro-start-macro-or-insert-counter "Run macro/Insert counter")
|
||||
("K" kmacro-end-or-call-macro "Stop or Run")
|
||||
("r" "Ring"
|
||||
("L" kmacro-view-ring-2nd "Display ring head")
|
||||
("d" kmacro-delete-ring-head "Delete ring head")
|
||||
("l" kmacro-call-ring-2nd-repeat "Run 2nd macro in ring")
|
||||
("n" kmacro-cycle-ring-next "Next in ring")
|
||||
("p" kmacro-cycle-ring-previous "Previous in ring")
|
||||
("s" kmacro-swap-ring "Swap first two"))
|
||||
("v" kmacro-view-macro-repeat "View last macro"))))
|
||||
;; rectangles ------------------------------------------------------------------
|
||||
(spacemacs/set-leader-keys
|
||||
"R!" 'clear-rectangle
|
||||
|
|
Loading…
Reference in New Issue