From 68a8b20a5f540046b86174d73e6853a25753e153 Mon Sep 17 00:00:00 2001 From: James Bunton Date: Mon, 21 Aug 2017 20:27:32 +1000 Subject: [PATCH] More keys for multiple cursors --- README_KEYBINDINGS.md | 11 +++++++++-- lisp/my-keys.el | 7 +++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README_KEYBINDINGS.md b/README_KEYBINDINGS.md index 4dc4113..c1b590e 100644 --- a/README_KEYBINDINGS.md +++ b/README_KEYBINDINGS.md @@ -150,13 +150,20 @@ C-x C-x Exchange point and mark C-M-h Highlight expression M-@ Set mark at end of next word C-= Expand region -C-c l Insert extra cursor on all lines in region -C-c m Ask to insert extra cursor at locations matching selected region M-= Display info about region C-. Go to last edit C-, Go to last edit reverse ``` +# Multiple cursors +``` +C-c m a Insert cursor at all matching points +C-c m l Insert extra cursor on all lines in region +C-c m m Ask to insert extra cursor at locations matching selected region +C-c m p Add cursor at previous text like region +C-c m n Add cursor at next text like region +``` + # Highlighting ``` M-s h u Unhighlight regexp diff --git a/lisp/my-keys.el b/lisp/my-keys.el index 14d9a76..0d55f3a 100644 --- a/lisp/my-keys.el +++ b/lisp/my-keys.el @@ -50,8 +50,11 @@ ;; Marking (global-set-key (kbd "C-=") 'er/expand-region) -(global-set-key (kbd "C-c l") 'mc/edit-lines) -(global-set-key (kbd "C-c m") 'mc/mark-more-like-this-extended) +(global-set-key (kbd "C-c m a") 'mc/mark-all-dwim) +(global-set-key (kbd "C-c m l") 'mc/edit-lines) +(global-set-key (kbd "C-c m m") 'mc/mark-more-like-this-extended) +(global-set-key (kbd "C-c m p") 'mc/mark-previous-like-this) +(global-set-key (kbd "C-c m n") 'mc/mark-next-like-this) (global-set-key (kbd "C-.") 'goto-last-change) (global-set-key (kbd "C-,") 'goto-last-change-reverse) -- 2.39.2