diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-01-09 03:28:51 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-01-09 03:28:51 -0500 |
commit | 65031f633a08da8b1f22d7ba0cbd5746a91daa36 (patch) | |
tree | 5ba57ac1558cf8eb893476558b89aed9d099d539 /lisp | |
parent | dafe3f07808b2b1f76c905e463a2b1950d8a37f2 (diff) | |
download | emacs.d-65031f633a08da8b1f22d7ba0cbd5746a91daa36.tar.gz |
Use hydra for multiple cursors
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-editing.el | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/lisp/init-editing.el b/lisp/init-editing.el index 6f181e5..5dfc668 100644 --- a/lisp/init-editing.el +++ b/lisp/init-editing.el @@ -327,12 +327,25 @@ touches." ;;; Multiple cursors -(define-key km/editing-map "a" 'mc/mark-all-like-this) -(define-key km/editing-map "b" 'mc/edit-beginnings-of-lines) -(define-key km/editing-map "e" 'mc/edit-ends-of-lines) -(define-key km/editing-map "l" 'mc/edit-lines) -(define-key km/editing-map "n" 'mc/mark-next-like-this) -(define-key km/editing-map "p" 'mc/mark-previous-like-this) +;; Multiple cursors hydra is modified from +;; https://github.com/abo-abo/hydra/wiki/multiple-cursors +(define-key km/editing-map "o" + (defhydra hydra-multiple-cursors (:hint nil) + " + ^^Up ^^Down +_p_ Next _n_ Next +_P_ Skip _N_ Skip +_y_ Unmark _u_ Unmark + +" + ("l" mc/edit-lines "edit lines" :exit t) + ("a" mc/mark-all-like-this "mark all" :exit t) + ("n" mc/mark-next-like-this) + ("N" mc/skip-to-next-like-this) + ("u" mc/unmark-next-like-this) + ("p" mc/mark-previous-like-this) + ("P" mc/skip-to-previous-like-this) + ("y" mc/unmark-previous-like-this))) (provide 'init-editing) ;;; init-editing.el ends here |