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

Add Boolean operators to "Find" #66206

Closed
VErwin opened this issue Jan 8, 2019 · 4 comments
Closed

Add Boolean operators to "Find" #66206

VErwin opened this issue Jan 8, 2019 · 4 comments
Labels
editor-find Editor find operations

Comments

@VErwin
Copy link

VErwin commented Jan 8, 2019

VS Code > Main Editor Window > Find (Ctrl + F)

Add new Boolean operators to search functionality. It would be nice if it used both Windows Query Language (AND, OR... ect) and logical operators (&, ||… ect).

newfeaturerequest_booleanooperatorsearchfield

@vscodebot vscodebot bot added the editor-find Editor find operations label Jan 8, 2019
@RMacfarlane
Copy link
Contributor

Search supports using regular expressions, which allows for robust pattern matching. You can turn it on for a search using the last button inside of the text input:

screen shot 2019-01-08 at 9 38 46 am

@VErwin
Copy link
Author

VErwin commented Jan 8, 2019

Hi Rachel :-) Thank you for providing the screenshot. 👍

The tooltip and icon as they are currently presented aren't very helpful for me. To me it read as wildcard - which is the opposite of what I'm trying to do. This might be a dumb question - but it seems that while pattern matching is helpful, it still gives me more results. I want to narrow down my results. Is there a 'not' operator?

Also - I think this is still a UX issue. If I couldn't find it, there might be other people who are having trouble. VS Code is being marketed as an entry-point to coding so it should be beginner friendly. I still think there should be an installation experience where you select 'beginner or experience' where you get more tooltips and better help if you are new, and if you're experienced, a list of shortcut keys... ect.

For this feature, I think that a good option is a pop-up on hover over the Find Field that gives me a list of operators that I CAN use. The feature as designed is not helpful.

Is there a UX backlog that I can send bugs to? There used to be a way to do this when I worked in DevDiv UX.

cheers! :-) Vanessa

@RMacfarlane
Copy link
Contributor

Yes, there is a way of writing 'not'. One way is with a negative lookahead, which looks like font-(?!weight). This will match all instances of "font-" except those that end in "weight", so the search is "looking ahead" after each match. The other way to negate things is using something like [^h]at. Using square brackets, you can specify a set of characters that you want to match, so for example [hc]at will match both "hat" and "cat". With the ^ inside of the brackets, its instead flipped to match anything except the letter "h" and then "at".

Regular expressions can be very difficult to read and compose, I frequently use https://regex101.com/ to test patterns I've written or break down something I come across in code. So I agree that this is not very friendly to beginners. @misolori has been working on the design of our Welcome page to highlight different actions based on whether someone is a new or returning user, similar to what you've described. My feeling about adding this in a lot of other places in the product is one of wariness, perhaps because I'm imagining a Clippy kind of scenario where too much noise is generated in trying to help users. But I think it's still useful to ask

  1. Do users know that they can perform more complex searches with regular expressions?
  2. Do users understand regular expressions, and if not, what can we do to make them successful?

@misolori Do we have a formalized UX backlog?

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Jan 9, 2019

@RMacfarlane I've added this to the ux backlog under "New users"

@miguelsolorio miguelsolorio mentioned this issue Jan 9, 2019
33 tasks
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-find Editor find operations
Projects
None yet
Development

No branches or pull requests

3 participants