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

[Feature Reuest] Preview regexp-replace in swiper #1948

Closed
seagle0128 opened this issue Mar 1, 2019 · 7 comments
Closed

[Feature Reuest] Preview regexp-replace in swiper #1948

seagle0128 opened this issue Mar 1, 2019 · 7 comments

Comments

@seagle0128
Copy link
Contributor

seagle0128 commented Mar 1, 2019

swiper-query-replace can start ‘query-replace’ with string to replace from last search string.
Is it possible to preview with overlays before actual doing replacement in swiper? It's really a good feature for regexp-replace. anzu does well but it's based on isearch and is unable to integrate swiper as the author clarified.

This is an example in anzu.

image

@abo-abo
Copy link
Owner

abo-abo commented Apr 3, 2019

I don't see why it's not possible to integrate. swiper-query-replace is essentially a thin wrapper around the built-in perform-replace. Any package that improves the built-in perform-replace (with e.g. an advice), will automatically improve swiper-query-replace as well.

@seagle0128
Copy link
Contributor Author

Hi @abo-abo The anzu package doesn't simply leverage or improve perform-replace.

@abo-abo
Copy link
Owner

abo-abo commented Apr 3, 2019

Then maybe it's a good idea to make a package that does just that, and have both swiper and anzu re-use that package. Even people that don't use either might find it useful.

@seagle0128
Copy link
Contributor Author

Yes. But I am thinking if it's possible to just port the related functionalities from anzu to swiper. Honestly I have no idea how to start.

@abo-abo abo-abo closed this as completed in df8901f Apr 3, 2019
@abo-abo
Copy link
Owner

abo-abo commented Apr 3, 2019

Thanks, please test.

@seagle0128
Copy link
Contributor Author

Thank you so much! I will test after upgrading the package.

@seagle0128
Copy link
Contributor Author

It does work as expected. Thank you so much!

astoff pushed a commit to astoff/swiper that referenced this issue Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants