-
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
Searches should be able to use the Editor by default #88154
Comments
some configuration options to explore:
|
Still unknown:
|
This is fantastic! Some questions as I've been using it today (pretty much all related to me trying to use this feature without a mouse)...
Happy to create issues for any or all of these. I only discovered this work yesterday, so I'm really not sure what's intentional and what's an issue. Thanks so much for your work on this! |
@adamlogic thanks for the feedback!
Yes you can use
I'm currently working on maintaining the editor state when you switch between editors, that should be out in the next insiders (Monday).
This one is interesting. You're opening a "new search", so it would make sense that the old search's settings aren't used, but it is also sometimes nice to be able to set particular file globs/etc. and have those persist across searches. I'm not sure what the right answer is here.
|
@adamlogic |
@JacksonKearl Thanks for all of that!
Exactly. I'm not so interested in persisting the options across searches as I'm interested in setting some defaults. I almost always want to search with regular expressions, so it'd great if I had the option to make that the default.
Perfect! If I want a keybinding that's only used in these search results, is there a boolean I could use in the |
If you could open a new issue for this we can continue discussion there. |
Thanks, this looks very promising. {
"key": "ctrl+shift+j",
"command": "workbench.action.search.toggleQueryDetails",
"when": "searchViewletVisible || inSearchEditor"
},
{
"key": "ctrl+shift+j",
"command": "-workbench.action.search.toggleQueryDetails",
"when": "searchViewletVisible"
} This is the same behavior as in the search viewlet, should this work? I can open a new bug for tracking if needed |
@carlocardella Yes please make a separate issue, thanks! |
@JacksonKearl #89536 |
Closing out as the initial goal, providing a way to use the Search Editor by default, has been completed. The command In addition, it can be triggered using the command pallet ( |
This is great, thanks Jackson! I assume this is currently in Insiders Edition and will roll out with the February or March update for non-Insiders users? |
This is currently in Insiders enabled by default. It will be in the January Stable, but behind feature flag |
@JacksonKearl this is helping a lot. Thank you very much for the hard work. Searching is one of the most important parts in an editor and you just made VSC a serious alternative for a lot of developers. Is it possible to focus on the search editor's results using a shortcut? I got lost in this step:
|
The existing command |
I just found out about this feature a few days back and am entirely excited for it. I've checked 1.41's preliminary experimental version and I'm currently looking at the insider's edition (1.42) version of it. Just wanted to say that this looks like it will be amazing. I know it is still in development, but I just wanted to ask a question: Is there any plan to allow us to be able to remove search results from the list? If so, I would love to make a suggestion. Currently, in the sidebar search, when you dismiss a search result (or a group of search results), you cannot undo that action with a cmd/control-Z. If this new search were to implement the feature of being able to dismiss certain search results, it would be great if that action was undoable. A lot of times, I will do my best to filter down the search results using regula expressions, but I still have to manually remove results. I often accidentally remove one I don't want to remove, then I have to start the search over from scratch, removing results I didn't need. Being able to undo a dismissed search result (or group of results) would be awesome. |
@JosephTLyons yes the results are displayed in an editor the same as any other editor in the application. You can edit them and undo/redo as you would any other document. |
@rublev it has been in vscode since 1.41. Most/all QOL features are missing until 1.42. It gets actually pleasant in 1.43 (insiders). |
@JacksonKearl Ah I'm on 1.42.1 VSCodium. So this expanded style search like sublime in the reply I quoted above is only available once 1.43 gets published (or whatever the correct word is)? edit: got it working, just wondering how to add the dimmed context lines around it. I toggled the option with cmd+alt+L in the search editor but the lines aren't dimmed. I also notice that if context is enabled, and i press f12 on a search result then in the sidebar of definitions in the popup there are definitions that do not include the matched search text, but also the context lines around it. |
The lines should be dimmed by default, I've seen cases where they don't dim until the editor gets focus, but not cases where they don't dim at all.
I'm not sure what you mean by this. Please open a separate issue with screenshots and reproduction step. |
I actually didn't even know that the lines would dim, as I don't think it has ever happened on my side. They do not dim for me by default unless I run |
I really am enjoying this feature, thank you a ton for your work here, it is greatly appreciated. There are a few things that I would love to have:
I realize that this is all inside of an editor, so I'm not sure actually what is possible, but these are just a few things I would love to have. |
@JosephTLyons you can delete and undo as you would in an editor. You can collapse results with standard folding operations. This works best in Insiders. |
Thats interesting, so if you trigger context lines with keybinding they dim, but if you trigger with the button they don't? Does that reproduce in Insiders?
We can't do this by default for accessibility reasons (I know we already do it for unused code, but I disagree with that 😉). It could be an option though. Again feel free to open a feature request to discuss further. |
Am I missing some magic sauce binding to get the search to trigger when you activate the keyboard shortcut? It puts the selection into the search but doesn't trigger the search. |
@spacesuitdiver do you have |
@JacksonKearl I don’t, I can type a space after the word and search commences. |
@JacksonKearl this is fixed on Insiders |
Something else that seems off or should be configurable is the fact that it opens a preview (unpinned) window. If I have to double click on the result in the find it should probably pin the editor. |
@spacesuitdiver in which cases does it open unpinned for you? It should be pinned in almost all cases (the exception being when you open a saved search editor from disk). |
@JacksonKearl I would want this to open pinned already. |
@spacesuitdiver what is the use case for that opening pinned by default? |
@JacksonKearl I guess my most compelling reasoning is it feels as if it should pin because you are double clicking it. This is also this is how Sublime Text operates. |
We're not looking to mirror every little detail of how Sublime operates. Without a concrete and compelling use case I don't think this will be added. |
Don't get hung up on my desire to want feature parity of Sublime Text, I gave up on that when VS Code marked this issue "as designed" 😆#29376. Again, as I said, my most compelling reasoning is it should behave similar to the file explorer, if you doubleclick you are pinning it. |
Currently, the way to use the new Search Editor experience is by first starting a search in either the viewlet or the panel, then copying those results over to an Editor. We should have an option to use the an Editor to begin with.
With this comes some questions:
This issue will be a staging ground for answering those questions.
Ref #23931.
The text was updated successfully, but these errors were encountered: