{"slug": "how-to-use-multiple-cursors-in-neovim-0-13", "title": "How to use multiple cursors in Neovim 0.13", "summary": "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.", "body_md": "[#41587](https://github.com/neovim/neovim/pull/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](https://www.reddit.com/r/neovim/) that it’s worth exploring.\n\nImportant\n\nThis post was written by hand, by me. No LLMs were used. Why do you folks so willingly hand over your thinking and penmanship?!\n\n## What this blog is not\n\nI 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.\n\n*“How do they compare to x?”* - no idea. Ask [Claude](https://claude.ai/) or do the research yourself.\n\n## A brief history\n\n[UltraEdit](https://wiki.ultraedit.com) introduced *Column Mode* in the 1990s - a precursor (pun intended!) to multiple cursors, letting you modify text in straight columns over multiple lines.\n\nBut it was [Sublime Text](https://www.sublimetext.com) that put multiple cursors on the map, introducing *“Multiple Selection”* in the public alpha of [Sublime Text 2](https://www.sublimetext.com/blog/articles/sublime-text-2-public-alpha) 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.\n\nA [post](https://news.ycombinator.com/item?id=7672721) on Hacker News from 2014 outlined many hardcore Vim enthusiast’s positions:\n\nVim 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.\n\nNote\n\nAn early em-dash spotted in the wild as far back as 2014…\n\nA Reddit [post from 2015](https://www.reddit.com/r/neovim/comments/44g53k/multi_cursor_in_neovim/) perfectly encapsulated the opposing view:\n\n“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)”\n\nPlenty of plugins tried to fill the void: [multicursor.nvim](https://github.com/jake-stewart/multicursor.nvim), [multicursors.nvim](https://github.com/smoka7/multicursors.nvim), and the excellent [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors).\n\nMy 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”](https://www.kevinli.co/posts/2017-01-19-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](https://github.com/olimorris/dotfiles/blob/c4e9704c3d3a8dc9a5cffb8827694f6ad769be16/.config/nvim/lua/keymaps.lua#L245-L296) 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.\n\nIt wasn’t until 1 September 2026 that multiple cursors landed in Neovim core, as part of [#41587](https://github.com/neovim/neovim/pull/41587). [Justin MK](https://github.com/justinmk) started thinking about this feature as far back as 2017 ([source](https://www.reddit.com/r/neovim/comments/1w4f06p/comment/p773mcr/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)).\n\n## Using multicursors\n\nAt 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](https://github.com/olimorris/dotfiles/blob/main/bin/nvimv) which I hacked from the [nvimv](https://github.com/jrop/nvimv) project.\n\nIn 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.\n\n### Basic example\n\nFor the first example, we’ll delete some characters with 3 cursors. Copy the Ruby code below into a fresh Neovim buffer:\n\n```\n# puts \"one\"\n# puts \"two\"\n# puts \"three\"\n```\n\n- Do\n`gg0`\n\nto put the cursor on the first line and column - Then execute the following commands in the buffer:\n\n```\nQ      \" sets a cursor at [1,1]\njQ     \" sets a cursor at [2,1]\njQ     \" sets a cursor at [3,1]\nxx     \" delete two characters, at all three cursors\n```\n\n- And you should see:\n\n```\nputs \"one\"\nputs \"two\"\nputs \"three\"\n```\n\nTold you it was basic!\n\nSo what can you learn from this? `Q`\n\nsets a cursor. Add more by pressing `Q`\n\nagain.\n\n*“Great, but how do I clear these cursors”*? For that, use `<c-l>`\n\n.\n\n### Using insert mode\n\nWith the same example as above, but this time let’s comment them out again. This shows what you can do in insert mode:\n\n- Execute the following:\n\n```\ngg0\nQ\njQ\njQ\nI# <esc><c-l>\n```\n\n- And you should see the lines are back to being commented out\n\n### A cursor for every search match\n\nWant to replace Vim’s search and replace (`:%s/foo/bar/g`\n\n) with multicursors? Let’s do it.\n\nAdd this to a new JavaScript buffer:\n\n``` js\nconst oldName = getThing()\nfoo(oldName)\nbar(oldName)\n```\n\n- Then execute:\n\n```\n/oldName<CR>    \" search as normal\n1Q              \" place a cursor at every match\nciw             \" change the word, everywhere\nnewName<Esc>    \" replacing with newName\n<c-l>        \" clear the cursors\n```\n\n- So you end up with:\n\n``` js\nconst newName = getThing()\nfoo(newName)\nbar(newName)\n```\n\nKey takeaway from this one, `1Q`\n\nplaces a cursor at every match!\n\n### Numbering a list\n\nSay we have a list of items - how do we number them with multicursors? Copy this to a new buffer:\n\n```\nInstall nightly\nOpen a scratch buffer\nFollow along\n```\n\n-\nThen execute the following:\n\n```\ngg0\nQ\njQ\njQ\ng<C-a>      \" Number the lines\ni.<space>   \" Add a space in insert mode\n<c-l>\n```\n\n-\nAnd you should end up with:\n\n```\n1. Install nightly\n2. Open a scratch buffer\n3. Follow along\n```\n\nFour examples in, hopefully you can see that multicursors just let you apply your regular Vim commands at multiple points in a buffer.\n\n### Using a visual selection\n\nYou can also set multicursors on a visual selection. Let’s uppercase these Ruby variables:\n\n```\nalpha = 1\nbeta = 2\ngamma = 3\n```\n\n- Execute the following in a buffer:\n\n```\ngg0\nVGQ    \" a cursor on every line of the selection\nviwU    \" select the inner word, uppercase it\n<c-l>\n```\n\n-\nAnd you should see:\n\n```\nALPHA = 1\nBETA = 2\nGAMMA = 3\n```\n\n### Moving the cursors\n\nWant to move or walk your cursors? Let’s take the example above and set every value to 42:\n\n```\nALPHA = 1\nBETA = 2\nGAMMA = 3\n```\n\n- Execute the following from line 1:\n\n```\nVGQ               \" a cursor on every line of the selection\n$                 \" move to the end of each line\nx                 \" delete the number\na42<esc>          \" insert mode and add 42 to each line\n<c-l>\n```\n\n- And you should see:\n\n```\nALPHA = 42\nBETA = 42\nGAMMA = 42\n```\n\nOne important note: visual mode enables “follow-mode” by default, meaning the cursors follow one another when you use `hjkl`\n\n.\n\n### Follow-mode\n\nLet’s explore follow-mode in more detail, using the same buffer as above.\n\n- This time, let’s manually create some cursors:\n\n```\n0\nQ\njQ\njQ\n```\n\n- Now press\n`w`\n\nand you’ll see only the last cursor moves. Press`B`\n\nto get to the start of the line - Now if you do\n`1q=`\n\n, you’ll be in follow-mode. Try moving the cursor now and you’ll see they all move. Do`2q=`\n\nto exit follow-mode.\n\n### Jumping between cursors\n\nThat last example probably leaves you wondering: what if I want to jump to the first or second cursor? Using the same example as before:\n\n- Place a cursor on each line, same as before:\n\n```\ngg0\nQ\njQ\njQ\n```\n\n- You’re back in Normal mode with three cursors placed. Now do\n`[C`\n\nor`]C`\n\nto jump between them\n\n### A register, per-cursor\n\nOne 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:\n\n```\nalpha,1\nbeta,2\ngamma,3\n```\n\n(sorta)\n\n- Execute the following:\n\n```\ngg0\nVGQ      \" a cursor per line, follow-mode on\nyiw      \" each cursor yanks its own word\n$p       \" each cursor pastes its own yank\n```\n\n- And you should see:\n\n```\nalpha,1alpha\nbeta,2beta\ngamma,3gamma\n```\n\nCompletely pointless example, but a cool feature nonetheless.\n\nNote\n\nIf you have the clipboard set to `unnamedplus`\n\nthen the example above won’t work\n\n### Replacing my old multicursors code\n\nRemember 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:\n\n```\nfunction login(user) {\n  return checkPassword(user)\n}\n\nfunction logout(user) {\n  endSession(user)\n}\n\nfunction resetPassword(user) {\n  return checkPassword(user)\n}\n```\n\n- Execute:\n\n```\n:g/checkPassword/normal! 0fcQ\n```\n\n`fc`\n\njumps to the first`c`\n\non the line, which lands on`checkPassword`\n\n. So every matching line now has a cursor on that word, enabling us to do:\n\n```\ncwverifyPassword<Esc>\n<c-l>\n```\n\n- And you should see:\n\n```\nfunction login(user) {\n  return verifyPassword(user)\n}\n\nfunction logout(user) {\n  endSession(user)\n}\n\nfunction resetPassword(user) {\n  return verifyPassword(user)\n}\n```\n\nThis should also work over the quickfix list with something like `:cdo normal! Q`\n\n.\n\n### One last thing\n\nOne final thing that I didn’t work into an example:\n\n`gQ`\n\nrestores the previous set of multiple cursors\n\n## Summary\n\nThe key thing to remember: `Q`\n\ninserts a multi-cursor. Practise these patterns enough and they’ll stick.\n\nA 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.\n\nBut I’m ripping out my old multiple cursors implementation and adopting these.\n\n2026 is shaping up to be quite the year for Neovim!", "url": "https://wpnews.pro/news/how-to-use-multiple-cursors-in-neovim-0-13", "canonical_source": "https://blog.olimorris.com/2026/09/02/multiple-cursors-in-neovim-0.13/", "published_at": "2026-09-03 15:07:39+00:00", "updated_at": "2026-09-03 15:23:19.897588+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Neovim", "Sublime Text", "Justin MK", "multicursor.nvim", "vim-multiple-cursors"], "alternates": {"html": "https://wpnews.pro/news/how-to-use-multiple-cursors-in-neovim-0-13", "markdown": "https://wpnews.pro/news/how-to-use-multiple-cursors-in-neovim-0-13.md", "text": "https://wpnews.pro/news/how-to-use-multiple-cursors-in-neovim-0-13.txt", "jsonld": "https://wpnews.pro/news/how-to-use-multiple-cursors-in-neovim-0-13.jsonld"}}