'mini.nvim' and multicursor
@justinmk is already working on this.
Since Sep 17, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
Research direction
Review the listed multicursor compatibility areas in mini.bracketed, mini.surround, mini.ai, mini.move, and mini.cursorword, along with the referenced Neovim multicursor issues. Reproduce each affected behavior and determine whether it needs a targeted fix, a refactor, or upstream resolution; done means the listed compatibility problems are resolved or split into actionable issues.
Written by the indexing model from the issue text.
Description
Neovim>=0.13 is planned to have multicursor functionality (neovim/neovim#41587), which introduces a visible amount of issues with 'mini.nvim' compatibility. This issue is meant to track them until they are resolved.
Most likely to be an upstream issue (without a known/possible way to fix this in 'mini.nvim'):
- 'mini.cursorword' and 'mini.trailspace' highlighting is drawn on top of multicursor highlighting. See neovim/neovim#41629.
'mini.bracketed': custom mappings foruand<C-r>affect how undo/redo is done when multicursor follow mode is enabled. See neovim/neovim#42037.'mini.move': moving Visual selection. See neovim/neovim#42005. Should be resolved on latest Neovimmaster.- Most (if not any) movement mappings won't currently work with
zq, since it doesn't support "textobjects, Lua,<Cmd>or ":" mappings" (:h zq). This affects 'mini.jump' (overridesf,t,F,T),n/Noverrides, etc.
In trial mode (either not known the root cause or might be solved within 'mini.nvim'):
-
'mini.bracketed' overrides
[Cand]Cmulticursor navigation mappings (those are first/last comment). I don't like the idea of changing the suffix forcommenttarget (breaking change). Instead adding a dedicated target for multicursor might be an option. -
Most parts of 'mini.surround' ("add" operator in Normal and Visual mode, actions) and (at least)
?textobject in 'mini.ai' don't fully work during multicursor editing. The reason is very technical and comes down to how their operators/textobjects interact with the newCmdAtomevent. See neovim/neovim#41657.It can be solved within 'mini.nvim' with a smarter choice of when to ask for user input (like not only after initial mapping, but also after its possibly cascading multicursor; but not after
.).Would require using privateSee this comment.vim.api.nvim__mcursor_cascading(). -
'mini.operators':
-
Exchange doesn't cascade properly since it requires some extra internal bookkeeping to match selected regions (on per multicursor) at step one with selected regions at step two. To do that properly, there needs to be some kind of exported way of getting an information about 1) current "multicursor session" id; and 2) currently active cursor id during cascading. Currently it might be doable by hacking with extmark id for extra cursors, but not sure how stable that would be.
Then instead of storing a single region at step one, exchange operator will be able to store multiple regions as a "cursor id" to region map. At step two performing matching region pairs with the same "cursor id" and doing the exchange.
-
All other operators seem to not have operator implementation specific issues with multicursor.
-
Solved:
'mini.clue' overrides aThis should be solved on latestQmapping to correctly replay the latest recording. This mirrors the built-inQ, but that has been repurposed for multicursor. The best solution is still merging upstream neovim/neovim#24565, but in the meantime not overridingQis good enough.mainby just not creating both@andQcustom mappings altogether. It seems that everything works without them present 🤞'mini.basics' overrides built-inThis should be solved on latest<C-l>mapping ("clear" action, including now multicursors) for a window navigation. I still think that it is better suited for window navigation, so probably creating something like<Esc>to serve as "clear" is reasonable.mainby 'mini.basics' creating a<C-c>basic mapping for "Stop, clear, redraw".Visually selecting 'mini.ai' textobjects only selects the main cursor and not extra cursors.Should be (mostly) resolved on the latestmain. There are some odd misplacing of the edit only once, but that doesn't look like a 'mini.ai' issue.
This is meant as a tracking issue for maintainers and public. For an unintended behavior that is not listed here, please create a separate issue (which can be discussed there and then listed here).
- Dominant language
- Lua
- Stars
- 9.6k
- Forks
- 314
- Avg merge
- 19h 10m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-mini/mini.nvim
-
feature-request mini.icons
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
mini.statuscolumn
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
feature-request mini.surround
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
new-module
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
feature-request mini.extra
Difficulty 3/5 1-2 days Newbie friendliness 48/100
All issues in nvim-mini/mini.nvim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
windwp/nvim-ts-autotag#266 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pterodactyl/game-eggs#657 ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
stalker57241/tabview#10 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
mfussenegger/nvim-dap#1613 · 2 comments ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100