Skip to content
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

Support find-replace #77

Open
dudicoco opened this issue Feb 15, 2024 · 2 comments
Open

Support find-replace #77

dudicoco opened this issue Feb 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@dudicoco
Copy link

Is your feature request related to a problem? Please describe.
It would be nice to use telescope as a one stop shop for both finding and replacing content in files.

Describe the solution you'd like
rg has the --replace flag which allows replacing the match, a key binding which would then perform the actual replacement is needed as a final step.

Additional context
Screenshot 2024-02-15 at 20 40 50

@dudicoco dudicoco added the enhancement New feature or request label Feb 15, 2024
@LLMChild
Copy link

LLMChild commented Jul 26, 2024

wow, did't know that before.
Adding a short cut to add --replace is quite simple, but how to render the diff preview of origin/replace?
Is there any idea?

@weeman1337
Copy link
Collaborator

Interesting idea 🤔

Unfortunately ripgrep doesn't support replace. From the man page

-r REPLACEMENT, --replace=REPLACEMENT
           Replaces every match with the text given when printing results. Neither this flag nor any other ripgrep flag will modify your files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants