multiple cursors
fice-t edited this page Apr 13, 2016
·
5 revisions
Pages 43
- Home
- Basics
- Binding Styles
- Breadcrumb
- Compilation
- Conditional Hydra
- defcustom
- Dired
- Elpy
- Emacs
- Flycheck
- fold dwim
- Git gutter
- Helm
- Helm 2
- Hydra Colors
- hydra ivy replacement
- Hydras by Topic
- Ibuffer
- Idris
- Info
- internals
- Macro
- Markdown mode
- multiple cursors
- Nesting Hydras
- Org agenda
- Org clock and timers
- Org mode block templates
- Org mode links
- Orgmode
- origami code folding
- PDF Tools
- Projectile
- Projectile & Fixmee
- Rectangle Operations
- Smartparens
- Switch to buffer
- Twittering
- Undo tree
- Unicode input
- Window Management
- YASnippet
- Show 28 more pages…
Hydra docs
Example hydras
Emacs
- Emacs
- Compilation
- Dired
- Flycheck
- Ibuffer
- Info
- Macro
- Org agenda
- Org-clock-and-timers
- Org-mode-block-templates
- Org mode links
- Rectangle-Operations
- Switch-to-buffer
- Unicode-input
- emacspeak-muggles
- Window-Management
Emacs Plugins
Clone this wiki locally
(defhydra multiple-cursors-hydra (:hint nil)
"
^Up^ ^Down^ ^Other^
----------------------------------------------
[_p_] Next [_n_] Next [_l_] Edit lines
[_P_] Skip [_N_] Skip [_a_] Mark all
[_M-p_] Unmark [_M-n_] Unmark [_r_] Mark by regexp
^ ^ ^ ^ [_q_] Quit
"
("l" mc/edit-lines :exit t)
("a" mc/mark-all-like-this :exit t)
("n" mc/mark-next-like-this)
("N" mc/skip-to-next-like-this)
("M-n" mc/unmark-next-like-this)
("p" mc/mark-previous-like-this)
("P" mc/skip-to-previous-like-this)
("M-p" mc/unmark-previous-like-this)
("r" mc/mark-all-in-region-regexp :exit t)
("q" nil))You could bind <mouse-1> to mc/add-cursor-on-click to add cursors with the mouse, but you have to force <down-mouse-1> to not exit the hydra. You can also ignore <drag-mouse-1> for good effect. You can do so with the following heads:
("<mouse-1>" mc/add-cursor-on-click)
("<down-mouse-1>" ignore)
("<drag-mouse-1>" ignore)