6 ms·
Also see the excellent https://github.com/your-tools/ruplacer https://github.com/your-tools/ruplacer. For more advanced needs, I have a custom thing called gre
by gurgeous 2y ago
Also see the excellent https://github.com/your-tools/ruplacer https://github.com/your-tools/ruplacer.
For more advanced needs, I have a custom thing called greprep that let's you make changes using your favorite editor. Workflow is like this:
1. $ rg -n .... > /tmp/lines.txt
2. (edit lines.txt in vscode)
3. $ greprep /tmp/lines.txt to apply the changes
- deleted 2y ago[deleted]
- jmarcher 2y agoIn Emacs, there is [helm-ag-edit](https://github.com/emacsorphanage/helm-ag https://github.com/emacsorphanage/helm-ag) (but uses ripgrep if present). It's almost identical to your workflow, but all done inside the same app. 1. helm-ag <pattern> # the search results are updated as you type 2. helm-ag-edit # edit the search result as regular text. Use multi-cursors, macros, whatever. 3. helm-ag-edit-save # commits the changes to the affected files All those commands have keybindings, so it's pretty fast. I'll often open up Emacs just to do that and then go back to my JetBrains IDE.