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

Toggle "word mode" #125

Open
wavexx opened this issue Oct 5, 2021 · 2 comments
Open

Toggle "word mode" #125

wavexx opened this issue Oct 5, 2021 · 2 comments

Comments

@wavexx
Copy link

wavexx commented Oct 5, 2021

Would it be possible to have a toggle for rg's "word mode" / -w?

Sometimes when searching for an expression, I realize there are just too many substring matches and I'd like to turn on word-boundary mode for the current search, just like we do for ignore.

@dajva
Copy link
Owner

dajva commented Oct 6, 2021

It's available in the menu (m) in the results buffer. If you want it as s real toggle look at https://rgel.readthedocs.io/en/2.1.0/configuration.html#function-rg-define-toggle

@wavexx
Copy link
Author

wavexx commented Oct 7, 2021

Works great. Is there also any way to give it a name and show the state of the toggle on the header line, as shown for "case"?

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