-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
CMD+D should be smarter #9978
Comments
FYI, Sublime Text utilise the settings from Find panel in order to match these words. |
@wallverb |
I recommend that VSCode adopt the behaviour that Atom has, and which I believe Sublime also has: If you don't start with a selection, then whole-word matching is implicit. For example: If I have the cursor at the beginning of the word "foo", then cmd-D will only match whole-word instances of "foo". If I select "foo", then cmd-D will match any substring. This is extremely convenient as a shorthand. FWIW, I personally find the feature where cmd-D respects the Find panel's case/whole-word settings to be quite exhausting. The setting I need is usually different every time I need to use cmd-D. I continually have to hit cmd-alt-c, cmd-alt-w in order to toggle these (and I rely on cmd-D a lot). My above suggestion will reduce the necessary keypresses to just one key, which would help greatly. |
This behavior is the only thing keeping me from switching to VS Code. It's unfortunate when I decide to rename a variable like "i" and it starts selecting random i's in the middle of other words. It ruins the refactor use-case of multiple cursors. |
Indeed. Replying to myself to make another important point:
...and it's exacerbated by the fact that you don't know what the case/word toggles are set to unless you hit cmd-F. Almost every time I use the cmd-D feature, not only are the toggles wrong, but I have to do a cmd-F just to see what the toggles are set to. |
The new version (1.9) semi-addresses the problem by making the toggle states visible when using Ctrl+D, but I don't see why these states are shared with the search functionality at this point. Doing this has probably added more complexity when compared to Sublime's behavior as described by @atombender |
@jameslieu: No, Sublime does not work that way. Read my explanation. Sublime always uses whole-word matching unless you explicitly make a selection before hitting cmd-D. It's a superior workflow and reduces the need for a whole-word toggle for cmd-D. @alexandrudima: Looks to me like this issue is being ignored. Any way we can move it forward? |
Steps to Reproduce:
1:1
and pressCMD+D
7 timesIt should only select next matches using case sensitivity and whole words
Here is Atom result for the same:
The text was updated successfully, but these errors were encountered: