logoalt Hacker News

LexiMaxyesterday at 7:36 PM7 repliesview on HN

> But where are the AI features?? Gonna get left behind!

Obviously vim doesn't need AI, but one feature I really wish vim had was native support for multiple cursors.

It's the feature that lured me away to Sublime Text in the first place many years ago, and it's a pre-requisite for pretty much every editor I use these days, from VSCode to Zed.

There are plugins, but multicursor is such a powerful force-multiplier that I think a native implementation would benefit.


Replies

mystifyingpoiyesterday at 7:52 PM

The canonical answer to this request is as follows: if you need multi-cursor (or, worse, multi-cursor with mouse support) then you are doing something non-Vim way (aka: wrong way) and there is a better way to do it.

If you need multi-cursor to do manual search and replace in text, then don't, just do automatic search and replace, maybe scoped to a block. If you need multi-cursor for refactoring or renaming a variable across entire source file, then don't, use LSP plugin (or switch to Neovim) and do the proper refactoring action.

Sure, there are legit cases of using multi-cursor in Vim, but they are rare. So it's not worth to put it into Vim itself.

show 1 reply
cmovqyesterday at 11:43 PM

Vim (kind of) has it though it doesn’t render the cursors:

Ctrl-V, then move down the lines you want to edit, Shift-I to insert text on multiple lines at once.

gjklieweryesterday at 8:04 PM

Multi cursor is on the neovim roadmap https://neovim.io/roadmap/

WhyNotHugoyesterday at 8:10 PM

Funny, I used multiple cursor a lot back when I used Sublime Text, but stopped needing them when I switched to Vim.

ivanjermakovyesterday at 8:22 PM

There are plenty of ways to achieve workflows that can be done witg multiple cursors even in plain Vim: macros, :norm, visual blocks, :s, etc.

stackbutterflowyesterday at 8:40 PM

I'm curious to know what kind of editing you do that you need this so much?

sejjeyesterday at 7:51 PM

How does it work?