mirror of
https://github.com/magnars/multiple-cursors.el.git
synced 2025-10-13 21:03:05 +00:00
Remove multiple cursors when reverting buffer.
This commit is contained in:
parent
8ec468f38a
commit
a4c4714587
@ -253,6 +253,8 @@ multiple cursors editing.")
|
|||||||
(remove-hook 'post-command-hook 'mc/execute-this-command-for-all-cursors t)
|
(remove-hook 'post-command-hook 'mc/execute-this-command-for-all-cursors t)
|
||||||
(mc/remove-fake-cursors)))
|
(mc/remove-fake-cursors)))
|
||||||
|
|
||||||
|
(add-hook 'after-revert-hook #'(lambda () (multiple-cursors-mode 0)))
|
||||||
|
|
||||||
(defmacro unsupported-cmd (cmd msg)
|
(defmacro unsupported-cmd (cmd msg)
|
||||||
"Adds command to list of unsupported commands and prevents it
|
"Adds command to list of unsupported commands and prevents it
|
||||||
from being executed if in multiple-cursors-mode."
|
from being executed if in multiple-cursors-mode."
|
||||||
|
23
todo.org
23
todo.org
@ -1,30 +1,29 @@
|
|||||||
* Ideas [1/5]
|
* Ideas [3/5]
|
||||||
** DONE rectangular-region-mode
|
** DONE rectangular-region-mode
|
||||||
Switch to a specialized multiple-cursors mode, anchoring it to the current
|
Switch to a specialized multiple-cursors mode, anchoring it to the current
|
||||||
cursor position. Moving around increases/decreases the size/number of cursors,
|
cursor position. Moving around increases/decreases the size/number of cursors,
|
||||||
to simulate vertical editing in textmate.
|
to simulate vertical editing in textmate.
|
||||||
** TODO Cycle through cursors
|
** DONE Cycle through cursors
|
||||||
To scroll the buffer and watch all your cursors - make a keybinding for
|
To scroll the buffer and watch all your cursors - make a keybinding for
|
||||||
promoting the next/previous fake cursor.
|
promoting the next/previous fake cursor.
|
||||||
** TODO Create replacements for common non-working commands
|
** TODO Create replacements for common non-working commands
|
||||||
Possible to do C-s ... how about M-y ?
|
Possible to do C-s ...
|
||||||
Any way to make M-z just prompt for letter once?
|
Any way to make M-z just prompt for letter once?
|
||||||
** TODO mark-multiple-mode
|
** TODO mark-multiple-mode
|
||||||
mark-multiple has some advantages
|
mark-multiple has some advantages
|
||||||
-> simpler visuals, no extra cursors (matter of taste?)
|
-> simpler visuals, no extra cursors (matter of taste?)
|
||||||
-> moving out of the marked area quits the mode
|
-> moving out of the marked area quits the mode
|
||||||
-> yank-pop actually works
|
** DONE unknown command: Do for (a)ll, (o)nce or (i)gnore -> (did that work ok? (k)eep doing that or (d)on't)
|
||||||
** TODO unknown command: Do for (a)ll, (o)nce or (i)gnore -> (did that work ok? (k)eep doing that or (d)on't)
|
|
||||||
unknown-command ran once - what now? (o)nce is enough, repeat for (a)ll, (u)ndo - that did NOT work.
|
unknown-command ran once - what now? (o)nce is enough, repeat for (a)ll, (u)ndo - that did NOT work.
|
||||||
unknown-command ran for all - did that work as expected? (y)es, (n)o
|
unknown-command ran for all - did that work as expected? (y)es, (n)o
|
||||||
what to do about unknown-command in the future? Run it (o)nce, or (s)top it from being run.
|
what to do about unknown-command in the future? Run it (o)nce, or (s)top it from being run.
|
||||||
* BUGS: [0/4]
|
* BUGS: [4/4]
|
||||||
** TODO with multiple regions active, C-d deletes only a char in the fake ones
|
** DONE with multiple regions active, C-d deletes only a char in the fake ones
|
||||||
** TODO there's something going wrong with last-command/this-command?
|
** DONE there's something going wrong with last-command/this-command?
|
||||||
expand-region works nicely, even collapse when we save er/history, but last collapse puts all cursors in same spot
|
expand-region works nicely, even collapse when we save er/history, but last collapse puts all cursors in same spot
|
||||||
** TODO clean up overlays when reverting buffer
|
** DONE clean up overlays when reverting buffer
|
||||||
** TODO rectangular-region-mode fails when lines of the buffer have been hidden (ref collapse in org-mode)
|
** DONE rectangular-region-mode fails when lines of the buffer have been hidden (ref collapse in org-mode)
|
||||||
* TODO: [4/6]
|
* TODO: [5/6]
|
||||||
** DONE (set-marker MARKER nil) for performance
|
** DONE (set-marker MARKER nil) for performance
|
||||||
** DONE C-g deactivates regions first, before disabling multiple-cursors
|
** DONE C-g deactivates regions first, before disabling multiple-cursors
|
||||||
** DONE more state to save per cursor: er/history
|
** DONE more state to save per cursor: er/history
|
||||||
@ -33,4 +32,4 @@
|
|||||||
mark-multiple goes back to being the util? or just dies?
|
mark-multiple goes back to being the util? or just dies?
|
||||||
given the problem with extract-var and undo, may just kill mark-multiple.
|
given the problem with extract-var and undo, may just kill mark-multiple.
|
||||||
problem with that is: C-g when doing rename-tag shouldn't go to multiple-cursors.
|
problem with that is: C-g when doing rename-tag shouldn't go to multiple-cursors.
|
||||||
** TODO add tests
|
** DONE add tests
|
||||||
|
Loading…
x
Reference in New Issue
Block a user