Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

'mini.nvim' and multicursor

Open
#2,546 16 comments 5 reactions 0 assignees View on GitHub

@justinmk is already working on this.

Since Sep 17, 2026.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
28/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
lua
Domain
devtools

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

ALL neovim-upstream

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 for u and <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 Neovim master.
  • 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' (overrides f, t, F, T), n / N overrides, etc.

In trial mode (either not known the root cause or might be solved within 'mini.nvim'):

  • 'mini.bracketed' overrides [C and ]C multicursor navigation mappings (those are first/last comment). I don't like the idea of changing the suffix for comment target (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 new CmdAtom event. 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 private vim.api.nvim__mcursor_cascading(). See this comment.

  • '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 a Q mapping to correctly replay the latest recording. This mirrors the built-in Q, but that has been repurposed for multicursor. The best solution is still merging upstream neovim/neovim#24565, but in the meantime not overriding Q is good enough. This should be solved on latest main by just not creating both @ and Q custom mappings altogether. It seems that everything works without them present 🤞
  • 'mini.basics' overrides built-in <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. This should be solved on latest main by '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 latest main. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-mini/mini.nvim

All issues in nvim-mini/mini.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.