-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature - preview #196
Comments
I think an external tool with git is probably much better for this kind of review. Alternatively, if what we really want is to show inline diffs that's maybe something that could be implemented, although a bit of a pain with ripgrep since we would have to call it twice (once without the replacement and once with). Note that you can already specify the If you use the Although context is broken for it temporarily. See: ast-grep/ast-grep#1381 (comment) |
Unfortunately inline diff can not work with rg atm, see BurntSushi/ripgrep#1872 |
@MagicDuck thanks for digging into this topic. The trick with Git is indeed something that could replace what I mentioned. I just need to get into the habit of committing everything before any serious renaming 😄 |
Yeah, or even just staging would be sufficient. |
@niba FYI, we now show a diff for replace. Here's an example with 2 lines of context (-C 2): |
Amazing! Thanks for letting me know |
I would like to propose a new feature called preview.
Very often, when I do search & replace in my projects, I want to quickly skim through the results to double-check everything. In vscode, when you perform a search and replace and select one of the results, you get a diff view of the entire file.
It would be really nice to have something similar here (if that's possible).
Workflow:
a) preview / diff shouldn't clutter your existing buffers.
The text was updated successfully, but these errors were encountered: