3 ms·
I was using neovim but nowdays I just fire up Sublime. neovim remains as a choice when I jump to other servers with SSH. The thing is that when I'm (for exampl
by _V_ 3y ago
I was using neovim but nowdays I just fire up Sublime. neovim remains as a choice when I jump to other servers with SSH.
The thing is that when I'm (for example) trying to RE some protocol and have bytes-only view, I move things around quite a lot. And Sublime has a powerfull tool for this: multiple cursors. I can create as many cursors as I need and edit multuple instances/bytes at once.
- vincentkriek 3y agoI dont understand the multiple cursors, is this better than search and replace? I am guessing you are replacing it to the same thing at every cursor, but I guess the value is then that the from could be different at the cursors?
- xrendan 3y agoI use this all the time and you can copy a range of values with multiple cursors and then paste them into the same size range. It's nice for hashes or modifying static lists that all need the same changes, but are annoying to regex for
- _V_ 3y agoIt works perfectly together - one is not necessarily replacement for the other. For more complicated things or bigger changes you would go with regex search & replace or sed/awk/grep but for small one-shot things it is way quicker to just click 5 times and do whatever you need to.
- _7tgr 3y agoYou can use marks in (n)vim for this! m<key> creates a mark. If <key> is a capital letter, you can jump to it across files. '<key> jumps to the line of the mark. `<key> jumps to the line + column of the mark. Although this doesn't let you _edit_ at the mark. There's multiple cursor plugins for that, I suppose... (I'll note that macros are useful in a lot of the same ways as multiple cursors) Edit: You can also use :vimgrep or another command that populates the quickfix list, and use :cdo to execute a command on every entry in the quickfix list.