helix icon indicating copy to clipboard operation
helix copied to clipboard

Add command to add word boundaries to search

Open mitsuhiko opened this issue 3 years ago • 0 comments

This adds a command to rewrite the search register to add word boundaries to the regex that's there. This is an alternative to #4222.

[keys.normal]
"*" = ["move_prev_word_start", "move_next_word_end", "search_selection", "make_search_word_bounded", "search_next"]

This seems more complex but has the added benefit that it can be used independently. So for instance if one is already down the search of something and discovers that it's not specific enough, a hotkey can be hit to automatically add word boundaries and resubmit the search:

[keys.normal]
A-s = ["make_search_word_bounded", "search_next"]

mitsuhiko avatar Oct 16 '22 21:10 mitsuhiko