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

Make addSelectionToNextFindMatch (ctrl+d) case-sensitive #4309

Closed
kowsheek opened this issue Mar 16, 2016 · 19 comments
Closed

Make addSelectionToNextFindMatch (ctrl+d) case-sensitive #4309

kowsheek opened this issue Mar 16, 2016 · 19 comments
Assignees
Labels
verified Verification succeeded
Milestone

Comments

@kowsheek
Copy link

  • VSCode Version: 0.10.11-insider
  • OS Version: Windows 10 Pro Insider Preview

Steps to Reproduce:

  1. Press ctrl+d on a word, it will select all words that match regardless of case

Expected:

Pressing ctrl+d on a word should select words that match with case-sensitivity

Reason:

It's annoying af sometimes.

@alexdima
Copy link
Member

@kowsheek Try Alt+C. This toggles case sensitivity of the find widget and for the ctrl+d:

@alexdima
Copy link
Member

There is also Alt+W for whole words

@kowsheek
Copy link
Author

Thanks! Alt+C works but would be nice if this was more discover-able.

@alexdima alexdima added the verified Verification succeeded label Mar 21, 2016
@aybabtme
Copy link

aybabtme commented Jun 9, 2016

@alexandrudima is there a setting I can change in my settings.json to disable case-insensitivity? It's really annoying and I'd like if I could have it always be case sensitive.

@alexdima
Copy link
Member

alexdima commented Aug 9, 2016

@aybabtme We could add a setting for the toggle's default value. Please file a new issue for it.

@aybabtme
Copy link

aybabtme commented Aug 9, 2016

@alexandrudima thanks, created #10344 (comment)

@timtimmytime
Copy link

For those trying on OS X it is option+command+c to toggle case sensitivity.

@theideaofnorth2
Copy link

option+command+c doesn't work on OS X. I just checked and I have the latest version of VSC.
Why is this issue closed? it isn't resolved at all.

@alexdima
Copy link
Member

cmd+alt+c is the keybinding we ship with by default for toggleFindCaseSensitive on OSX. @theideaofnorth2 Can you please open a find widget (such that you can observe the state of the case sensitive toggle) and press cmd+alt+c:

case-sensitive

If this does not work for you, can you please try this key combination in the define keybinding widget (Preferences > Keyboard Shortcuts):

image

If the keybinding cmd+alt+c is not detected correctly please create a separate issue.

@theideaofnorth2
Copy link

Thank you @alexandrudima for the reply. I had another software that was taking over cmd+alt+c so after disabling it I am now able to switch the case sensitivity setting.

However, I see that my choice is not persisted after I close and reopen VSC... Would it be possible to enable a setting for this? Also, in my opinion, case sensitivity should be enabled by default :)

@alexdima
Copy link
Member

@theideaofnorth2 Let's track that in #11574

@sarbbottam
Copy link

I show how cant get this to work 😢

@martincohen
Copy link

I would decouple Find Next/Previous (dialog on Ctrl+F) from the Find Next Occurrence (Ctrl+D). These two are completely different functions for different use cases. I'd decouple by simply adding more variants of the command (or specifying command options), everybody can map what they want.

  • editor.action.addSelectionNextWordCaseSensitive
  • editor.action.addSelectionNextWordCaseInsensitive
  • editor.action.addSelectionCaseSensitive
  • editor.action.addSelectionCaseInsensitive

Also I might add that Sublime has additional behavior:

  • If you have no selection, hit Ctrl+D, you are selecting by word boundaries. (possibly also matching case)
  • If you have selection, hit Ctrl+D, you are selecting without word boundaries. (possibly also not matching case)

This plus case in/sensitive versions of the command could provide very natural behavior. (case sensitivity is skewed in Sublime as well, it's about time to fix this forever)

@jakedarc
Copy link

This is a pretty significant pain point for me in trying to switch over from Atom. Making case sensitivity options persistent doesn't solve this issue because, as @martincohen states, the use cases for Find and Find Next Occurrence are completely separate.

Case insensitivity in the Find dialog is a convenience so someone doesn't have to type something they're looking for the exact same way as it appears in the file. Find Next Occurrence exists to select the exact same thing you have already selected, usually to then type something to change both. Why would I ever want this function to select two things that aren't the same?

I would be on board with making it an option, but forcing users to manually switch case sensitivity back and forth based on which Find function they're using at the time isn't a good experience.

@jakedarc
Copy link

This probably isn't the nicest way to solve this problem, but I decided to just go ahead and write an extension for those of us who wish this command was case sensitive. :) Now I can happily go about using Code.

@mouradhamoud
Copy link

I think the default should be case sensitive.

@RoarkeRandall
Copy link

A little confused, what was the final decision on this? Why is the multiple cursors feature (cmd + d) being coupled with the other find functions? They may be similar in implementation, but they are two distinct features.

When using multiple cursors w/ cmd+d, you're almost always looking for a symbol. In the search functionalities, you often want to just find the general location of a topic. Using the same setting for case sensitivity on these two features means you're constantly changing the setting.

@szabolcsdombi
Copy link

I am using version 1.12.1 still no settings for case-sensitivity.

@wbercx
Copy link

wbercx commented May 22, 2017

@cprogrammer1994 I'm on 1.12.2. To the best of my knowledge, what I am about to describe is not introduced by an extension and I am not sure if this is a recent addition, but:

  • Select your text
  • Press CTRL+D / CMD+D
  • Tiny little widget appears in the top right corner of your file editor where you can toggle case sensitivity or whole-word matching

It's only there for few seconds before it hides itself again.

@alexdima alexdima added this to the May 2017 milestone May 31, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
verified Verification succeeded
Projects
None yet
Development

No branches or pull requests