mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-14 05:13:05 +00:00
Added a new function mc/mark-pop that sets cursors by popping marks off the mark stack.
This commit is contained in:
parent
69c99618f9
commit
4535033952
23
mc-mark-pop.el
Normal file
23
mc-mark-pop.el
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
;;; mc-mark-pop.el --- Pop cursors off of the mark stack
|
||||||
|
|
||||||
|
(require 'multiple-cursors-core)
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun mc/mark-pop ()
|
||||||
|
"Add one cursor to each line of the active region.
|
||||||
|
Starts from mark and moves in straight down or up towards the
|
||||||
|
line point is on."
|
||||||
|
(interactive)
|
||||||
|
;; If the mark happens to be at the current point, just pop that one off.
|
||||||
|
(while (eql (mark) (point))
|
||||||
|
(pop-mark))
|
||||||
|
(mc/create-fake-cursor-at-point)
|
||||||
|
(exchange-point-and-mark)
|
||||||
|
(pop-mark)
|
||||||
|
(mc/maybe-multiple-cursors-mode))
|
||||||
|
|
||||||
|
;; A good key binding for this feature is perhaps "C-S-p" ('p' for pop).
|
||||||
|
|
||||||
|
(provide 'mc-mark-pop)
|
||||||
|
|
||||||
|
;;; mc-mark-pop.el ends here
|
@ -182,6 +182,7 @@
|
|||||||
(require 'mc-edit-lines)
|
(require 'mc-edit-lines)
|
||||||
(require 'mc-cycle-cursors)
|
(require 'mc-cycle-cursors)
|
||||||
(require 'mc-mark-more)
|
(require 'mc-mark-more)
|
||||||
|
(require 'mc-mark-pop)
|
||||||
(require 'rectangular-region-mode)
|
(require 'rectangular-region-mode)
|
||||||
(require 'mc-separate-operations)
|
(require 'mc-separate-operations)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user