by AeroNotix · 2y ago · 0 comments
M-x lsp-rename in emacs, for example works great, if you're using lsp.
Have two thousand strings which all need the same edits? No need to do a find/replace operation, you can do it directly in the editor.
I might be missing something here, but how is making 2000 individual selections better than `:%s/oldstring/newstring/g`?
I'm guessing that you have a rule for setting up those 2000 selection, or something?
I mean, even for like 5 identical edits, the regex is going to be faster, so you must have a short way of performing the multi-selection.
Also when working with lists it is useful, you spawn cursors on , or < or whatever symbol you've got at a fixed location between lines, and then you can manipulate text in any number of otherwise different lines.