cd /news/developer-tools/how-to-use-multiple-cursors-in-neovi… · home topics developer-tools article
[ARTICLE · art-120366] src=blog.olimorris.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

How to use multiple cursors in Neovim 0.13

Neovim 0.13 will include native multiple cursors support, merged via pull request #41587 into Neovim Nightly on 1 September 2026, ending over a decade of community demand. The feature, popularized by Sublime Text 2 in 2011, was previously only available through plugins like multicursor.nvim and vim-multiple-cursors. The blog post by olimorris provides practical examples for using the new multicursors in Neovim Nightly.

read8 min views1 publishedSep 3, 2026
How to use multiple cursors in Neovim 0.13
Image: source

#41587 saw multiple cursors (“multicursors”) support merged into Neovim Nightly, scheduled for release in Neovim 0.13. It’s been in Sublime Text for over a decade yet is a divisive feature, believe it or not, in the Neovim community. But, it comes up so often on the Neovim subreddit that it’s worth exploring.

Important

This post was written by hand, by me. No LLMs were used. Why do you folks so willingly hand over your thinking and penmanship?!

What this blog is not #

I won’t tell you whether you should use multiple cursors. Deciding what belongs in your workflow is a skill only you possess - keep honing it.

“How do they compare to x?” - no idea. Ask Claude or do the research yourself.

A brief history #

UltraEdit introduced Column Mode in the 1990s - a precursor (pun intended!) to multiple cursors, letting you modify text in straight columns over multiple lines.

But it was Sublime Text that put multiple cursors on the map, introducing “Multiple Selection” in the public alpha of Sublime Text 2 at the start of 2011. That’s where I and many others first came across the feature. Ever since, it’s been a monthly recurring question on the Neovim subreddit.

A post on Hacker News from 2014 outlined many hardcore Vim enthusiast’s positions:

Vim doesn’t need multiple cursor support. Train yourself to think in Vim—you’re editing text and words, not moving a cursor. Macros and global replace already do what you want.

Note

An early em-dash spotted in the wild as far back as 2014…

A Reddit post from 2015 perfectly encapsulated the opposing view:

“I am a user of sublime text and occasionnaly vim. One of the main reason that keeps me from adopting vim as my primary platform is that there is no plugin in vim that is close to sublime text in matter of multi-cursor (i currently use vim-multi-cursor)”

Plenty of plugins tried to fill the void: multicursor.nvim, multicursors.nvim, and the excellent vim-multiple-cursors.

My own stance had always been: “anything I want from multiple cursors can be obtained with macros or search and replace”. Kevin Li’s fantastic 2017 post, “Multiple Cursors in 500 bytes of Vimscript”, showed how to “play a macro over search results”. I ported his work to Lua in my own dotfiles and never looked back. I was so impressed I offered to buy Kevin a coffee on LinkedIn - he said my praise was enough. These days I use those mappings maybe a few times a week.

It wasn’t until 1 September 2026 that multiple cursors landed in Neovim core, as part of #41587. Justin MK started thinking about this feature as far back as 2017 (source).

Using multicursors #

At the time of writing this blog post, you’ll need Neovim Nightly installed. If you don’t have that, feel free to leverage my Neovim install script which I hacked from the nvimv project.

In this section, I’ll show you multicursors through practical examples. Copy the code snippet into Neovim and follow the instructions. Question how it feels to you and repeat a few times until you’ve memorised the patterns.

Basic example

For the first example, we’ll delete some characters with 3 cursors. Copy the Ruby code below into a fresh Neovim buffer:

  • Do gg0

to put the cursor on the first line and column - Then execute the following commands in the buffer:

Q      " sets a cursor at [1,1]
jQ     " sets a cursor at [2,1]
jQ     " sets a cursor at [3,1]
xx     " delete two characters, at all three cursors
  • And you should see:
puts "one"
puts "two"
puts "three"

Told you it was basic!

So what can you learn from this? Q

sets a cursor. Add more by pressing Q

again.

“Great, but how do I clear these cursors”? For that, use <c-l>

.

Using insert mode

With the same example as above, but this time let’s comment them out again. This shows what you can do in insert mode:

  • Execute the following:
gg0
Q
jQ
jQ
I# <esc><c-l>
  • And you should see the lines are back to being commented out

A cursor for every search match

Want to replace Vim’s search and replace (:%s/foo/bar/g

) with multicursors? Let’s do it.

Add this to a new JavaScript buffer:

const oldName = getThing()
foo(oldName)
bar(oldName)
  • Then execute:
/oldName<CR>    " search as normal
1Q              " place a cursor at every match
ciw             " change the word, everywhere
newName<Esc>    " replacing with newName
<c-l>        " clear the cursors
  • So you end up with:
const newName = getThing()
foo(newName)
bar(newName)

Key takeaway from this one, 1Q

places a cursor at every match!

Numbering a list

Say we have a list of items - how do we number them with multicursors? Copy this to a new buffer:

Install nightly
Open a scratch buffer
Follow along

Then execute the following:

gg0
Q
jQ
jQ
g<C-a>      " Number the lines
i.<space>   " Add a space in insert mode
<c-l>

And you should end up with:

1. Install nightly
2. Open a scratch buffer
3. Follow along

Four examples in, hopefully you can see that multicursors just let you apply your regular Vim commands at multiple points in a buffer.

Using a visual selection

You can also set multicursors on a visual selection. Let’s uppercase these Ruby variables:

alpha = 1
beta = 2
gamma = 3
  • Execute the following in a buffer:
gg0
VGQ    " a cursor on every line of the selection
viwU    " select the inner word, uppercase it
<c-l>

And you should see:

ALPHA = 1
BETA = 2
GAMMA = 3

Moving the cursors

Want to move or walk your cursors? Let’s take the example above and set every value to 42:

ALPHA = 1
BETA = 2
GAMMA = 3
  • Execute the following from line 1:
VGQ               " a cursor on every line of the selection
$                 " move to the end of each line
x                 " delete the number
a42<esc>          " insert mode and add 42 to each line
<c-l>
  • And you should see:
ALPHA = 42
BETA = 42
GAMMA = 42

One important note: visual mode enables “follow-mode” by default, meaning the cursors follow one another when you use hjkl

.

Follow-mode

Let’s explore follow-mode in more detail, using the same buffer as above.

  • This time, let’s manually create some cursors:
0
Q
jQ
jQ
  • Now press w

and you’ll see only the last cursor moves. PressB

to get to the start of the line - Now if you do 1q=

, you’ll be in follow-mode. Try moving the cursor now and you’ll see they all move. Do2q=

to exit follow-mode.

Jumping between cursors

That last example probably leaves you wondering: what if I want to jump to the first or second cursor? Using the same example as before:

  • Place a cursor on each line, same as before:
gg0
Q
jQ
jQ
  • You’re back in Normal mode with three cursors placed. Now do [C

or]C

to jump between them

A register, per-cursor

One very cool feature: each cursor reads and writes to its own register, meaning registers are cursor-local. Macros can’t do that! Let’s use a new example:

alpha,1
beta,2
gamma,3

(sorta)

  • Execute the following:
gg0
VGQ      " a cursor per line, follow-mode on
yiw      " each cursor yanks its own word
$p       " each cursor pastes its own yank
  • And you should see:
alpha,1alpha
beta,2beta
gamma,3gamma

Completely pointless example, but a cool feature nonetheless.

Note

If you have the clipboard set to unnamedplus

then the example above won’t work

Replacing my old multicursors code

Remember Kevin Li’s trick from earlier - playing a macro over search results? I wanted to see if multicursors could replace it. Turns out they can. Put this in a new buffer:

function login(user) {
  return checkPassword(user)
}

function logout(user) {
  endSession(user)
}

function resetPassword(user) {
  return checkPassword(user)
}
  • Execute:
:g/checkPassword/normal! 0fcQ

fc

jumps to the firstc

on the line, which lands oncheckPassword

. So every matching line now has a cursor on that word, enabling us to do:

cwverifyPassword<Esc>
<c-l>
  • And you should see:
function login(user) {
  return verifyPassword(user)
}

function logout(user) {
  endSession(user)
}

function resetPassword(user) {
  return verifyPassword(user)
}

This should also work over the quickfix list with something like :cdo normal! Q

.

One last thing

One final thing that I didn’t work into an example:

gQ

restores the previous set of multiple cursors

Summary #

The key thing to remember: Q

inserts a multi-cursor. Practise these patterns enough and they’ll stick.

A word on the implementation: I was curious to see what Neovim’s take on multiple cursors would look like. My honest reflection, after using them for under 24 hours, is that they’re excellent and feel genuinely Vim-like. Will they shift the folk in the “you don’t need multiple cursors in Vim” camp? Probably not.

But I’m ripping out my old multiple cursors implementation and adopting these.

2026 is shaping up to be quite the year for Neovim!

── more in #developer-tools 4 stories · sorted by recency
── more on @neovim 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-use-multiple-…] indexed:0 read:8min 2026-09-03 ·