6 ms·
Up next for 0.13: multiple cursors! I have no idea what I'd do with this feature but it sounds intriguing. https://neovim.io/roadmap/ https://neovim.io/roadmap
by helterskelter 7mo ago
Up next for 0.13: multiple cursors! I have no idea what I'd do with this feature but it sounds intriguing.
https://neovim.io/roadmap/ https://neovim.io/roadmap/
- steve_adams_86 7mo agoI'm not sure how people typically use neovim, but in Zed I find multiple cursors (especially combined with multiple file buffers) extremely ergonomic for refactoring quickly and easily where tools like find and replace or simple renaming doesn't suffice. It lets you scan through and add cursors where you need them, then perform your edits across locations and even files all at once. It's so nice that it played a significant role in me keeping Zed early on despite it missing a lot of extensions I used in VS Code.
- gesis 7mo agoI am so used to sed-style, regex powered find/replace, that this use admittedly never occured to me. As a result, multi-cursor seemed mostly useless outside of pair programming that I never do. I will have to try it out once it lands in neovim just to see if I can wrap my muscle memory around it.
- runevault 7mo agoFor me the nice thing about multiple cursors is when it would take more time to write the regex than it does to just throw down say 8 cursors and update the spots.
- skydhash 7mo agoThere’s an overlap between “Find and Replace” and Macros, but it’s too small for multi cursors to be particularly useful for me. Especially with emacs where I can bring up all the lines in a separate buffer and edit them there (occur-mode) or do the same for a set of files (grep-mode and wgrep)
- wredcoll 7mo agoHow do you place the cursors then?
- hiccuphippo 7mo agoIn vim? Ctrl+v, 8, j, shift+i, add the text, Esc. Which works if you need to edit several aligned lines in a row. The one thing I'm missing is putting the cursors on the next found position of a search term which would make it much more useful.
- steve_adams_86 7mo agoI've always told myself I should learn to do these sed/regex find and replace techniques, but my origins are not sophisticated and I use computers like that orangutan hammering nails in the video with David Attenborough https://youtu.be/IFACrIx5SZ0?si=NcWGBNq272KoYB2i&t=84 https://youtu.be/IFACrIx5SZ0?si=NcWGBNq272KoYB2i&t=84 It's entirely possible that you don't need multiple cursors
- bluecalm 7mo agoYou have very convenient macros. If there is something you want to do in places you are going to mark first then you can just execute it right there instead. If it's just one edit you just do it right there without macro and use the dot to repeat it in more places. If those places can be created automatically then again it's just a macro you execute over many lines.
- thiht 7mo agoNot sure I under the Zed argument, VSCode has supported milti-cursors since the very beginning. It was made popular (not invented) by Sublime Text because it made it reaaaally easy (middle click+drag), so Atom and VSCode carried the feature.
- scuff3d 7mo agoIt's funny because I miss this one all the time. I got use it in Sublime and VScode before making the jump to Neovim. I know you can get similar functionality from macros and what not, but it's just not the same.
- meekins 7mo agoReally excited about this! At least in Sublime Text I've found multiple cursors a really powerful tool for ad-hoc transformations on snippets of semi-structured text or instantly and visually applying the same edit on multiple similar lines.
- tekawade 7mo agoLookup helix tutorial. It’s pretty useful.
- Iridescent_ 7mo agoKakoune has replaced many features with multicursor, including the sed-like commands (where you just select an area, search for patterns inside it to create the multiple cursors, then perform regular edits (which also means you can perform much more complex than simple replaces). It is really useful for refactors, e.g. even if you don't have any LSP (e.g. for plain text) you can easily rename symbols, reorder/select in log files, etc
- w4rh4wk5 7mo agoMulti cursor support in VSCode replaced 98% of my need for macros. Yes, macros are more powerful, but they are pretty easy to get wrong. With multiple cursors, it's far easier to spot where your inputs don't work out and adjust accordingly. Multi cursor is the feature that increased my productivity the most across the board.
- skydhash 7mo agoProper macros are vim and emacs one. They have proper movement shortcut that fits both code and prose. Especially as code is formal notation, such that it’s structured quite rigidly, macros composition can be seen as a meta language. Multi cursors is more suited for the “work hard, not smart”, like preferring litteral search instead of learning regex.
- cassepipe 7mo agoForget macros and multi-cursor. (Regex) substitutions from vim's command line replaced 98% of my editing needs and rendered a lot of my vim-fu useless. (Just like searching with / replaced 98% of my navigation) Editing something without having to actually place the cursor anywhere is a killer feature Also neovim can show you your substitutions live, no need for a plugin anymore. It's the default.
- deleted 7mo ago[deleted]
- cpill 7mo agoWord Bro! Regex is so simple to read and easy to get right... and its like if Immanuel Kant wrote find and replace, yeah, learn a new language to do a single function... yEAH! 98% Bro! I'd marry Regex if I could (but if we got divorced it would be my exregex [which is almost a palindrome!] Bro!)
- mayli 7mo agoBro, not every guy/girl is a regex master, multi-cursor is a much better UI/UX wysiwyg editor for everyday users.
- themadsens 7mo agoWhats with all the fuss over multicursor. How is this different from just using '.'
- wilkystyle 7mo agodot repeat is the wrong comparison. A closer one would be macros, but even then a good multiple cursors implementation is often faster, more intuitive, and requires less cognitive overhead. One of the better examples of the usefulness of multiple cursors is from Emacs Rocks (link goes to 0:23): https://m.youtube.com/watch?v=jNa3axo40qM&t=23s https://m.youtube.com/watch?v=jNa3axo40qM&t=23s
- camgunz 7mo agoWhat do you when the things you want to change don't all fit on the screen at once?
- luxurytent 7mo agoYou do a search/replace which has a similar function, although applied differently.
- wilkystyle 7mo agoAt least in e.g. Emacs and sublime text, you can mark all occurrences throughout the entire file. Assuming the matches are similar enough that the same motions apply even if you can't see the cursor, you can perform those operations. Otherwise, as a sibling comment said, incremental search/replace is your friend.
- eviks 7mo agoThat's one challenge I haven't seen editors tackle correctly by, e.g. having some special condensed view where only lined with cursors are shown so you can see more cursors on the screen and easier scroll around to see even more skipping the rest of the text (like some git diff tools do, showing only diffs with minimal context) So you either cycle through cursors (if your editor has a concept of "primary cursor") to see before/after or you do it blindly and accept a chance to be wrong
- eviks 7mo agoYou'd do text editing with it with the coolest feedback loop - immediately seeing the changes and what those changes apply to beforehand, that's different from having to repeat some macro multiple times
- dizhn 7mo agoHighlighted search/replace does this pretty well too.
- eviks 7mo agoNot really, it only does it for the first edit, while multiple cursors offer continuous feedback for all further besides, search/replace has extra toolbar and usually can't as easily select, for example, "current Identifier under cursor" if those are different, so it's worse before the first edit as well
- dizhn 7mo agoI'll have to try that out sometime. Never used multiple cursors. However, search/replace with vim/neovim isn't just the first edit either. It highlights all matches and shows you the proposed changes as you type as well. (It is probably a configurable thing).
- eviks 7mo agoHow can it show proposed changes if search doesn't match anymore after edits? You search for OLD, replace it with NWE, then notice the typo, delete 2 chars and type EW. How can search and replace help you here without searching for NWE anew? Yeah, do try it out to at least see the difference
- dizhn 7mo agoI am not saying it's better or you shouldn't use multiple cursors. It does help a lot as opposed to the old way of not seeing what would have been changed. How does multiple cursors work anyway? How do you place them? By search? Is it used for anything other than working on matching text?
- andrepd 7mo agoMultiple cursors were the killer feature that got me to start using Sublime Text back in ~2010. Still an absolute staple of my text editing toolbox. Ctrl-D Ctrl-D Ctrl-D ...
- qiine 7mo ago"Image API: vim.ui.img" Oh neat!
- natas 7mo agoone cursor for you one cursor for claude code :)
- luxurytent 7mo agoLLMs: Look, I can write code! neovim users: hold my beer, multicursor is here!
- alwillis 7mo agoLooking forward to multiple cursors… but Vim/Neovim can already do some of the common use-cases for multiple cursors, like prepending (or appending) text to a bunch of lines using visual block mode [1]. Here’s a video example [2]: [1]: https://neovim.io/doc/user/usr_10/#_visual-block-mode https://neovim.io/doc/user/usr_10/#_visual-block-mode [2]: https://www.reddit.com/r/vim/comments/jai57c/the_usefulness_of_the_often_ignored_visual_block/ https://www.reddit.com/r/vim/comments/jai57c/the_usefulness_...
- keyle 7mo agoAny chance regular vim will some day get multiple cursors? That's the one thing I miss.
- willrshansen 7mo agoHelix editor is based around that. Better than vim default imo