Releases: brenton-leighton/multiple-cursors.nvim
Merge registers on exit
A few new features have been added:
Merge registers on exit: When multiple cursors is exited, any registers in the virtual cursors will be merged into the real registers. Previously the virtual cursor registers were just discarded.
Go to commands (gg
and G
): These commands move the cursors to lines starting with count
.
Remove in opposite direction: The MultipleCursorsAddDown
and MultipleCursorsAddUp
commands will now remove cursors when used in the opposite direction to how cursors were previously added. This can be disabled with the remove_in_opposite_direction
option.
Align function
- Add the
align
function, which inserts spaces to align the cursors - Fix not recognising
0
when getting a motion command - Update documentation for changes in Neovim 0.10
Repeat command and in-built completion
Add support for:
- The repeat command (
.
) - In-built completion (
<C-n>
,<C-p>
,<C-x> ...
)
A note on how to disable nvim-cmp has been added to README.md
Improvements to visual mode
- Maintain visual area when adding cursors in visual mode
- Support visual mode for custom key maps
Custom highlight groups
Features:
- Use custom highlight groups (
MultipleCursorsCursor
andMultipleCursorsVisual
) to allow for changing the colour of the virtual cursors
Bug fixes:
- Set key maps for the local buffer (rather than globally) to fix existing local buffer key maps not being overridden
- Use
virtualedit = onemore
in custom key map functions to fix an issue where the cursor position would be incorrect in insert mode
Lock virtual cursors
Add a command (MultipleCursorsLock
) that will toggle locking the virtual cursors to allow for moving (or editing at) only the real cursor
Add cursor and jump to next match
- There are two new commands for incrementally adding cursors to matches:
MultipleCursorsAddJumpNextMatch
: Add a virtual cursor to the word under the cursor then move the real cursor to the next matchMultipleCursorsJumpNextMatch
: Move the real cursor to the next match
- The commands to add cursors to matches have been renamed again, sorry.
MultipleCursorsAddBySearch
is nowMultipleCursorsAddMatches
MultipleCursorsAddBySearchV
is nowMultipleCursorsAddMatchesV
- Commands related to adding cursors to search matches are now ensured to be case sensitive
- It's now possible to add multiple cursors using a count with the
MultipleCursorsAddDown
andMultipleCursorsAddUp
commands - When exiting multiple cursors, the position of the cursor will now be restored to the position of the first virtual cursor
- The implementation of up and down movement has been simplified, which means that virtual cursors no longer go off screen
Add cursors by search
- Change the
MultipleCursorsAddToWordUnderCursor
toMultipleCursorsAddBySearch
andMultipleCursorsAddBySearchV
MultipleCursorsAddBySearch
will search for the word under the cursor in normal mode, or the visual area text in visual modeMultipleCursorsAddBySearchV
is the same asMultipleCursorsAddBySearch
, by will limit matches to the previous visual area
- Handle switching buffers while multiple cursors is active
- Improve custom_key_maps and add documentation on plugin interoperability
Named registers
- Add ability to use named registers
- Add option for custom key maps to get two characters as input
- Provide
register
andcount1
to custom key map functions so that they can be set every time the function is called - Fix missing normal mode y command
Create cursors at matches to the word under the cursor
Adds a command to create cursors at matches to the word under the cursor