-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Expand to word boundary if we are at a single char selection when pressing *
#6045
Comments
You could remap this inside your user config to do |
[keys.normal]
"*" = ["move_prev_word_start", "move_next_word_end", "search_selection"] I don't want to see this as built-in behavior for |
The description and issue title are misleading. I suggested that
I only suggested this because I do agree it fights a bit with selection => action paradigm but I taught that the additional usability would be worth it here for the same reasons as in |
I'd like to add my 2 cents:
I agree completely, it's a surprising behavior and makes the editor unpredictable. Also it breaks one use case I bump into more often than I'd like - searching for unicode or malformed characters. Say I need to work with a generated SQL file which has a messed up encoding and I want to fix it. It's very practical to be able to select the malformed character, search for it in the whole file and replace it with the correct one. Pressing I don't mind having the functionality mentioned in this issue, but please make it a separate command so that I can still use the old behavior. |
When pressing
*
to use the current selection as the search pattern, it would be useful to automatically expand to the whole word if there's a single char being selected.The logic behind this is:
*
automatically searches for the word under the cursor (no need to first select the word)/<the char to search>
to achieve the same result)This has been discussed on matrix with @pascalkuthe:
I'm working on a PR for this proposition ;)
The text was updated successfully, but these errors were encountered: