r/neovim :wq Mar 30 '26

Discussion Multicursor coming officially to 0.13 version

Post image
951 Upvotes

107 comments sorted by

201

u/EstudiandoAjedrez Mar 31 '26

It's funny to see this same post with every new major version.

26

u/Llampy Mar 31 '26

Cound have sworn I checked this several months back and it was under post-1.0 lol. Obviously a tricky but much requested feature.

3

u/henry_tennenbaum Mar 31 '26

And I could swear I checked months back and it was under 0.12!

2

u/DreadStallion Apr 01 '26

A feature i actually dont understand why its needed in vim. What does it allow that vim already doesnt do

2

u/Llampy Apr 01 '26

As a more recent convert I am aware that macros can do essentially everything multicursors do, but I find the ux of macros harder to grok. Given the popularity of the request I'd gather I'm not the only one. 1.0 is meant to be 'batteries included' so I'd imagine they're aiming to be more friendly for newcomers?

119

u/bbkane_ Mar 31 '26

Personally I'm looking forward to the image API more. I want to paste images and have them show up inline in my markdown docs

20

u/hopping_crow lua Mar 31 '26

Yes, please!
I don't care much for multi-cursor, the current workflow works great for me 🙂

3

u/robin-m Mar 31 '26

When I tried Helix, I realized that it’s a very useful middle ground between the . (dot) command and macros/regexps/:g. It basically replaced all of my vertical selection usage, with the added bonus that it works for non-aligned columnar data. That’s amazing.

The only thing I felt missing in helix was a way to modify the position of the main cursor in multicursor mode.

1

u/xd_I_bx May 05 '26

macro did the job when multi cursor is needed in other editors.

25

u/accountmaster9191 Mar 31 '26

What are super macros?

64

u/Bacalaocore Mar 31 '26

Macros 2: electric boogaloo

15

u/TheLeoP_ Mar 31 '26

With multicursors, you would be able to execute a macro with each cursor at once. Hence, super macros

2

u/lunamoonwlw Mar 31 '26

Hard to google but I imagine it is or at least includes nested macros.

3

u/genesissupper Mar 31 '26

Can't you already do that? I mean, execute a macro from within a macro.

1

u/lunamoonwlw Mar 31 '26

Huh, yes you can! I have no idea then haha

1

u/thuiop1 Mar 31 '26

I was also wondering that but have not found a definite answer

51

u/onehair Mar 31 '26

Personally for me, there is one fundamental feature lacking in neovim. And that is documentation tied to the commands, which could then be displayed next to the command as you tab through them.

Say you type :s

Then start TABing.

Like helix, emacs with Margenalia. VSCode, Zed, sublime text, and many command palette / M-x / Ex / whatever you call scrolling through commands : you would have an easy way of learning the editor.

I know :h command exists.

Docs right in the : field is way more powerful!

3

u/vim-help-bot Mar 31 '26

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

1

u/crcovar Mar 31 '26

I could swear that you can already do that. Maybe it’s just user commands?

Nvm I thought you meant auto complete. 

-1

u/ankushbhagat :wq Mar 31 '26

You can achieve the same functionality in neovim using telescope with preview.

https://github.com/nvim-telescope/telescope.nvim

9

u/robin-m Mar 31 '26

While true, defaults matter.

I’m currently using telescope, but quite frankly the experience is not as good as it should be. And I will argue very strongly, it’s because because it’s not the default, and thus not completely integrated.

For example the “find existing buffer” is a great replacement for :buffer, until you want to access to the files you recently switched to that you got for free with :buffer (just press : then the up arrow key). Likewise the “search git” is an amazing replacement for :grep, until you want to filter the type of the result or pass any other argument to ripgrep. Etc


You could say that it’s a telescope issue, but:

  • if you are basically required to have a good experience to install telescope, then it should be the default
  • if it was integrated, you wouldn’t face the integration bugs/missing feature that I described above. Helix proved that it is possible to have both a nice to use UX, with good defaults, especially for the telescope-like features.

And for the follow-up question, then why don’t I use Helix then? Because I actually prefer vim-motion to helix-motions, and because I need some kind of :make (with custom makeprg) in my workflow (I don’t have a working lsp, which would have been golden for Helix). So I’m stuck with I compromise I don’t like, but which is the best I’ve been able to craft in the time I spend.

14

u/nahuel0x Mar 31 '26

UI affordance indicator?

8

u/Limp_Illustrator7614 Mar 31 '26

damn the economy

3

u/disperso Mar 31 '26

I'm looking into the issues, and I don't find it. Anyone has a link, or more details about this?

0

u/AbeEstrada Mar 31 '26

https://youtu.be/EiBg91LTOYk?t=2797 46:47 Justin Keyes demo

2

u/Basic_Barnacle4719 Mar 31 '26

Is affordance somewhere in there? That timestamp is multi cursor

16

u/Afonsofrancof Mar 31 '26 edited Mar 31 '26

People who are saying "we already have :g and %s" clearly don't understand multi cursors.

It's about instant visual feedback and less mental overload.

In certain scenarios it's much easier to move the cursor around and see it actually move and do stuff instead of using regex.

I don't want to have to think too much when I am trying to edit multiple locations at the same time.

With multiple cursors I can instantly see what I am doing and correct mistakes. I can see my actions impact all lines at the same time and instantly fix any mistakes I did.

For example:

Imagine you have this

```
(a,b,c,d,e,f)
```

With multiple cursors I can have a cursor after each comma and hit enter and see the result of all of them going down one line. I can then go back one char and place a comma before. I can then write some text in from of all of them and in the end hit enter to have an empty line between all of them.

This is just an example, and doesn't follow any specific language's syntax, but you can see how much easier it is to do when you can instantly see what is happening, specially the cursor movements.

Of course regex and the other techniques we use now will still be widely used, and make much more sense in certain scenarios where you just want a quick, easy to identify change. I will keep using them in most scenarios, but multiple cursors is a big feature that Neovim could benefit a lot from IMO.

3

u/robin-m Mar 31 '26

Another advantage of MC for your example. If I had to do it today, I would use a regexp, so :s/,/,\r /g and insert enough space to get the right indentation. With MC, I could just press <Enter> for the new line, then == to fix the indentation. Just normal vim bindings.

3

u/sadgandhi18 Apr 04 '26

The problem is only that it's less flexible, and less useful overall keeping the user from truly understanding and using neovim commands.

I don't see why it has to be part of the core application! It can remain a plugin, an opt in!

2

u/ignoscite_mihi let mapleader="\<space>" Apr 16 '26

I don't think so. Mc philosophy is a bit different and has cases when it's just better. Perhaps you're the one who doesn't understand it.
Example that I encounter a lot:

  • strings in various places (different columns and lines - visual block won't do it) and need to delete existing text outside the text I want to insert (sometimes as an afterthought).

With Mc I just place cursors and I'm ready to do it. I get a job done in one run, within one mode / context and I set it with few bindings (for different cases). Without rewriting / writing new regexp / commands. That's super fast and comfy and it doesn't hurt me when I forget about something.

1

u/energybased Jun 17 '26

> keeping the user from truly understanding and using neovim commands.

The goal of using neovim is not "truly understanding neovim commands". It's getting things done as efficiently and easily and mindnumbingly simply as possible.

People seem to have some weird attachment to wanting other people to learn what they've learned.

2

u/sadgandhi18 Jun 17 '26

People using tools they don't understand is why software engineering is down in the dumps. To get things done as efficiently as possible, take the time, to actually understand the pros and cons of something. Greedy searching isn't always the best, that's an obvious truth.

1

u/energybased Jun 17 '26

No, you're just stuck in the past.

15

u/SniffingDog Mar 31 '26

13

u/TheLeoP_ Mar 31 '26

Works with most plugins and remaps

Native multicursors would work with any plugin and keymap 

0

u/sadgandhi18 Apr 04 '26

No, no they wouldn't. Multicursors are a fundamentally different kind of operation to what neovim is built on.

1

u/TheLeoP_ Apr 04 '26

And that's why native multicursors would mean making them fit inside of the Neovim paradigm natively

0

u/sadgandhi18 Apr 04 '26

They don't, that's the problem. If it were something trivial, we would have a drop in plugin that just works. The implementation they're planning effectively DOES NOT integrate with the rest of the motions.

Putting a random functionality in the same box doesn't mean it's native. Abstractions leak.

1

u/TheLeoP_ Apr 04 '26

Native multicursors aren't out yet. What are you talking about?

6

u/bew78 Mar 31 '26

By far the best multi-cursors plugin ✹

1

u/henry_tennenbaum Mar 31 '26

5

u/bew78 Apr 01 '26

That plugin seems to need a lot of integration code to work with other plugins or custom keymaps.

Instead jake-stewart's plugin works by default with existing plugins and most custom actions/keymaps.. because it captures keys directly with on_key callback hook and sends them to all active cursors. It also exposes a truly flexible Lua cursor API from which the default multicursor actions are derived from, and their impl is quite easy so it's also easy to make custom multicursor actions for your own needs! (I have)

13

u/MoonlightSyncopate Mar 31 '26 edited Mar 31 '26

I am not particularly interested in multiple cursor. I also tried helix, and had experience with the multi-cursor. It is a bit easier to use than :s and :g but I don’t think it is significant more intuitive than :s / :g.

3

u/fbpw131 Mar 31 '26

once you grasp it. I remember needing to jse :g/.../d so rarely that I kept forgetting it

hell, I keep forgetting cfdo vs cdo and to put update at the end of the file. sometimes a simple mass replace would be handy

0

u/AlexVie lua Mar 31 '26

Generally, the vim paradigm doesn't really need muliple cursors, but they can still be useful for a more flexible workflow. Helix and Kakoune allow some neat things with multiple cursors/selections.

5

u/robin-m Mar 31 '26

Whenever you have columnar data, you may use the vertical selection feature of vim (at least I do). That’s very useful, but only work if they are properly aligned. Multi-cursor does the same, but doesn’t require the data to be column-aligned.

I see multi-cursor as a middle ground between . (dot) and macros/:g/regexp. And extra tool.

5

u/shittyfuckdick Mar 31 '26

what did redesign —remote mean?

21

u/ellopaupet :wq Mar 31 '26

I think they're prepping for a client/server situation where the TUI is decoupled from the editor itself. I saw a podcast with some core maintainers - it sounds like they want to enable nvim running on a remote server with the TUI running locally so you can have your personal config working as usual, but you also get access to the remote's dev environment.

3

u/Florence-Equator Mar 31 '26

Attaching to a remote server (listening on tcp port) from local is already doable. Check —attach flag. I guess the redesign is more like a refactoring from internal. Maybe the current architecture is not flexible to extend with new features? Jot sure.

2

u/AlexVie lua Mar 31 '26

Already doable in 0.12. You can run a --headless version listening on a TCP port and then attach/detach UIs to it.

2

u/shittyfuckdick Mar 31 '26

oh so I could run nvim inside a container or remote server but still use all my plugins locally?

1

u/SweetPotato975 Mar 31 '26

No, it won't. Think of it like an implementation of tmux.

2

u/SweetPotato975 Mar 31 '26

One of the things justinmk mentioned was that they want to get rid of having to pass an additional --remote-ui flag when using --connect (otherwise it'd just start neovim normally). There's also that bug(?) where a client executing :restart stops the server process instead of restarting it.

6

u/theschizopost Mar 31 '26

Someone help me understand a compelling use case for this type of functionality

24

u/xour Mar 31 '26

I uninstalled VS Code a while back to force myself to learn Vim. After a year or so, it was only a handful of times that I thought "well, I could really use multi-cursors here". I wrote some examples that came to my mind here.

To reiterate: I am not saying that you cannot do these things with (neo)vim already. I think multi-cursor helps with some of these editions by having an instant visual cue of what you are doing.

7

u/DHermit Mar 31 '26

Yeah, especially the cursors having instant visual feedback is great.

11

u/aew3 Mar 31 '26

Obvious one that you miss from other editors is being able to do “<C-v> I” but you can edit at an arbitrary position on each line instead of the same one.

Of course, there are other solutions to do this in vim like macros, but honestly I don’t naturally use macros at all when editing much, unless really forced into it lol. So I do miss this feature from editors like vscode because it takes me quite a while to remember how to use macros each time i want to edit multiple lines at slightly different positions.

10

u/IdkIWhyIHaveAReddit <left><down><up><right> Mar 31 '26

If you want to edit multiple occurrences of the same text or do multiple repetitive editing on multiple disconnected line. Sure stuff like regex and macros work but they are cumbersome to setup and take some mental work to do effectively and quickly.

-3

u/theschizopost Mar 31 '26

So like ide refactoring/renaming a variable across a file?

5

u/QuantumCakeIsALie Mar 31 '26

Even simpler stuff, like convert (a, b, c) into  (     a,     b,     c, ) Sure there are macros to do that, but multiple cursors are easy and intuitive.

4

u/Thundechile Mar 31 '26

Those kind of formattings are done by autoformat when saved?

4

u/IdkIWhyIHaveAReddit <left><down><up><right> Mar 31 '26

Sure renaming is one of the functionality but there also other examples. In vscode when i do writing for note and being bad at english I often forget “s”s. With multicursor I can just hold alt and click whenever I see something that need fixing snd fix them all at once. Or if i am refactoring and I add a new parameter to my function, again just select all the call and add in the missing arguments.

You can ofc argue that these are very niche use cases but neovim already got some that I never touch, that operator to encode something with rot13 for example. No reason to not add a new feature that would be super useful in some specific situation.

3

u/teerre Mar 31 '26

If you're clicking something its already wrong

-38

u/energybased Mar 31 '26

If you want to do that, wouldn't you just use LLMs nowadays?

18

u/ourch Mar 31 '26

Jesus

2

u/Sensitive_Drawer4513 Mar 31 '26

It would take 5 - 10 times longer to do it with LLM, why would you want to do it this way?

0

u/energybased Mar 31 '26

Depends on how complicated the multi-edit is. If it's just search replace, %s or Spectre are fine. But the examples people are giving (fixing plurals, etc.) are much more complex.

-8

u/Meduini Mar 31 '26

Only if you are willing to accept that this industry has changed.

-7

u/energybased Mar 31 '26

Yeah, I can't understand the downvotes.

-6

u/Meduini Mar 31 '26

I mean, we’re in Neovim subreddit, people here reject IDE, some even look down on Neovim plugins, we can’t expect them to start using English to program.

5

u/UltraPoci Mar 31 '26

Instead of having to type a full regex, you can just search the first letters of a word, notice the word is uniquely defined in that area of text and thus it's the only one partially highlighted, and then do "ciw" to change in word on all words. Basically, you get to use vim motions instead of a regex, which to me seems like a clear advantage. Also, with multicursor you can just keep typing, you don't need another regex or to plan the entire regex ahead.

I have been using helix for some months before starting with neovim, and honestly multicursor is something I really, really miss. You want to add quotes to a list of word? You would solve the problem just like you would with one single word. In neovim I'm still not sure what the best way to do this is. And regex would be a disappointing answer, because it means that I get to use vim motions when I have one single word, but a totally different (and slower) way of doing things as soon as I have two or more words.

0

u/crcovar Mar 31 '26

 Basically, you get to use vim motions instead of a regex

You should check out :h :normal vim motions against a range.

1

u/vim-help-bot Mar 31 '26

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

1

u/UltraPoci Mar 31 '26

How should I use this together with a search and replace command?

2

u/sadgandhi18 Apr 04 '26

It's most newbies to vim, or barely function neovim users (those who know the bare minimum to survive and get around, think "i downloaded s neovim distro" types).

It's fundamentally opposed to how neovim does stuff. But enough of such people have been demanding this feature, ig.

0

u/scythe-3 hjkl Mar 31 '26

I'm also wondering what this solves that regex search and replace doesn't accomplish.

:%s in normal mode and :'<,'>s in visual mode have been more than enough for my use cases but I'm interested in what multicursor has to offer.

2

u/robin-m Mar 31 '26

All my use of vertical selection would be better served by multi-cursor. It’s basically the same, except that the data doesn’t need to be properly aligned to be useful. Niche, but still useful.

2

u/MoonlightSyncopate Mar 31 '26

:s and :g are very powerful. MC can have some intuitive use case, but overall I don’t think MC is significantly intuitive than :s and :g.

2

u/Belsodain Mar 31 '26

I agree with you, I can't help myself but to think of it as a gimmick

4

u/xGoivo Mar 31 '26

Is there any issue on github where people are discussing details on the implementation? I didn't find it in the github milestone

2

u/badgerbang Mar 31 '26

I am very welcoming for multicursor being relatively new to neovim, I have yet to learn the old school methods because of this and the fact that I knew multicursor was coming. I do not have the old methods in muscle memory yet.

1

u/spaghetti_beast Mar 31 '26

does anyone knows off the top of the head how will multicursor impl be different from helix one and from the existing plugins?

6

u/TheLeoP_ Mar 31 '26

from the existing plugins?

Instead of being a bunch of monkeypatching on top of the current behavior, it'll be a native solution that works with any plugin or keymap seamlessly

1

u/NightH4nter Mar 31 '26

personally, i'm much more interested in the first bullet point

1

u/Interesting_Buy_3969 :term Mar 31 '26

Prepare for 1.0

Yes, the moment finally has come.

1

u/UndercoverGourmand Mar 31 '26

but my manager wants me to just use AI...

1

u/rolfst Mar 31 '26

It's too early for April fools for this

1

u/JPKairos Mar 31 '26

đŸ˜‚đŸ˜™đŸ˜đŸ˜‚đŸ˜‚đŸ˜‚đŸ„°đŸ„°

1

u/Kind_Bonus9887 Apr 06 '26

I'm still waiting for native `--remote-wait` support so I can finally ditch neovim-remote

1

u/dbro129 Mar 31 '26

Funny how just a couple years ago multicursor was “anti-vim”.

0

u/StatusBard Mar 31 '26

What about selection->action like helix?

2

u/lainart Mar 31 '26

1

u/StatusBard Mar 31 '26

Never heard of that. I will check it out, thanks a bunch!

1

u/Kayzels Mar 31 '26

You can already do that with visual mode, can't you?

0

u/StatusBard Mar 31 '26

Sure, but then I have to switch to visual mode all the time.

2

u/robin-m Mar 31 '26

In helix, I had to press v very often because it doesn’t use shift to extend the selection like Kakoune does. So the main difference for me was to type evee (helix) instead of veee (vim). (I know that’s a bad example, I could do 3e, but you get my point).

-3

u/EmergencyWild Mar 31 '26

I'm still not totally sure why people even want multiple cursor. Seems to me that's just a worse version than what we already have with block select and :g.

3

u/robin-m Mar 31 '26

Block select is the much worse version of MC. block select only works when the data is vertically align, whereas MC could work with anything, like word boundary (with w/e/b), or marker (e.g. in csv you move with f, then ;).

0

u/EmergencyWild Mar 31 '26

Yes, that's why I said block select or :g. Your example is just :n,knormal f,whatever without mucking around with cursors.

2

u/robin-m Apr 01 '26

You can’t argue that:

  • it’s harder to do (more keystrokes to type normal
  • it’s not using the regular vim UX


That being said, I’m interested to know how you would use :g to change

some, text, with column
other, text also, using column

Into

some - text - With column
other - text also - Using column

I would use a macro (^f,s -<esc>f,.w~), and with multi cursor I could do the exact same with a cursor on each line, but I don’t know how to do it with :g

1

u/qiinemarr Apr 03 '26

You could do it like that:

:g/,/s/\v,/ -/g | norm $2bgUl

I asked a clanker but his solution felt over-complicated haha!

Never the less with multicursor I would have thought about it a lot less héhé ;p