by _V_ · 3y ago · 0 comments
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.
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.
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.