From ae3d06215368a512f531593427a90f2e39091a9f Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sun, 19 May 2019 19:23:18 -0400 Subject: [PATCH] Switch MC hydra to auto columns, add mark count --- .emacs.d/init-hydra.el | 49 ++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/.emacs.d/init-hydra.el b/.emacs.d/init-hydra.el index 3bad2d5..6d21e35 100644 --- a/.emacs.d/init-hydra.el +++ b/.emacs.d/init-hydra.el @@ -40,36 +40,33 @@ ("t" todotxt-open-file "open todotxt") ("q" nil)) -(defhydra hydra-mc (:hint nil) - " - Mark Bulk: _a_ll _s_ymbols _r_egex - Edit: _l_ines _e_nds - Misc: _n_umbers _S_ort -Mark (+S=unmark): __:prev __:next __:skip prev __:skip next" - ("a" mc/mark-all-dwim) - ("s" mc/mark-all-symbols-like-this) - ("r" mc/mark-all-in-region-regexp) +(defhydra hydra-mc () + "Marks: %(mc/num-cursors)" + ("a" mc/mark-all-dwim "all" :column "Bulk") + ("s" mc/mark-all-symbols-like-this "symbols") + ("r" mc/mark-all-in-region-regexp "regex") - ("l" mc/edit-lines) - ("e" mc/edit-ends-of-lines) + ("l" mc/edit-lines "lines" :column "Edit") + ("e" mc/edit-ends-of-lines "ends") - ("n" mc/insert-numbers) - ("S" mc/sort-regions) + ("n" mc/insert-numbers "number" :column "Misc") + ("S" mc/sort-regions "sort" :column "Misc") - ("" mc/mark-next-like-this) - ("C-n" mc/mark-next-like-this) - ("" mc/mark-previous-like-this) - ("C-p" mc/mark-previous-like-this) - ("S-" mc/unmark-previous-like-this) - ("C-S-n" mc/unmark-previous-like-this) - ("S-" mc/unmark-next-like-this) - ("C-S-p" mc/unmark-next-like-this) - ("" mc/skip-to-next-like-this) - ("M-n" mc/skip-to-next-like-this) - ("" mc/skip-to-previous-like-this) - ("M-p" mc/skip-to-previous-like-this) + ("" mc/mark-previous-like-this "prev" :column "Manual") + ("" mc/mark-next-like-this "next") + ("S-" mc/unmark-next-like-this nil) + ("S-" mc/unmark-previous-like-this nil) + ("" mc/skip-to-previous-like-this "skip prev") + ("" mc/skip-to-next-like-this "skip next") - ("" nil)) + ("C-p" mc/mark-previous-like-this "prev" :column "Manual (Alt)") + ("C-n" mc/mark-next-like-this "next") + ("C-S-p" mc/unmark-next-like-this nil) + ("C-S-n" mc/unmark-previous-like-this nil) + ("M-p" mc/skip-to-previous-like-this "skip prev") + ("M-n" mc/skip-to-next-like-this "skip next") + + ("" nil nil)) (defhydra hydra-mc-manual (:hint nil :foreign-keys run) "