← Back to context

Comment by dizhn

6 hours ago

I'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).

How 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

  • I 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?

    • Your place them via search, manual click, extending up/down the line, via "match current word"

      And it's also used for new text entry, not just editing matching text, e.g., add an extra field to each of these 5 arrays

      1 reply →