You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chain undos together in insert mode. Prevent ghostly cursors.
This commit provides basic chaining of undos in insert mode. Previously, undos
of changes made in multicursor mode are done one character at a time. This
change should chain all inserts into a single undo block, and undo them
together. This fixes#22.
We're also adding support to detect non-terminating single key commands. For
example, previously, 'd' would break multicursor mode and cause these ghostly
cursors to linger on screen, where the only way to get rid of them is to press
`<C-n>` somewhere to start a new multicursor mode. Now, these unterminated
commands are detected and simply cause a nop, execution continues and we're left
in multicursor mode. This paves the way to support multikey commands in the
future. This fixes#28.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,9 @@
1
+
## 2.0 (04/24/2013)
2
+
3
+
Bugfixes:
4
+
- Fix inconsistent undo behavior. Changes made in multicursor insert mode are now undone together. This fixes #22.
5
+
- Single key commands that do not terminate properly no longer cause ghostly cursors to linger on screen. An error message is now displayed informing the user the number of cursor locations that the input cannot be properly played back at. This fixes #28.
Copy file name to clipboardExpand all lines: README.md
+1-4Lines changed: 1 addition & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Two additional keys are also mapped:
38
38
39
39
You can also add multiple cursors using a regular expression. The command `MultipleCursorsFind` accepts a range and a pattern, and it will create a virtual cursor at the end of every match within the range. If no range is passed in, then it defaults to the entire buffer.
40
40
41
-
**NOTE:**The plugin is still somewhat buggy, if at any time you have lingering cursors on screen, you can press `Ctrl-n` in Normal mode and it will remove all prior cursors before starting a new one.
41
+
**NOTE:**If at any time you have lingering cursors on screen, you can press `Ctrl-n` in Normal mode and it will remove all prior cursors before starting a new one.
42
42
43
43
## Mapping
44
44
Out of the box, only the single key `Ctrl-n` is mapped in regular Vim's Normal mode and Visual mode to provide the functionality mentioned above. `Ctrl-n`, `Ctrl-p`, `Ctrl-x`, and `<Esc>` are mapped in the special multicursor mode once you've added at least one virtual cursor to the buffer. If you don't like the plugin taking over your favorite key bindings, you can turn off the default with
@@ -88,11 +88,8 @@ highlight link multiple_cursors_visual Visual
88
88
## Issues
89
89
- Multi key commands like `ciw` do not work at the moment
90
90
- All user input typed before Vim is able to fan out the last operation to all cursors is lost. This is a implementation decision to keep the input perfectly synced in all locations, at the cost of potentially losing user input.
91
-
- Single key commands that do not terminate properly cause unexpected behavior. For example, if the cursor is on the first character in the buffer and 'b' is pressed.
92
-
- Undo behavior is unpredictable
93
91
- Performance in terminal vim degrades significantly with more cursors
0 commit comments