-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Search: target particular set of files #20530
Comments
Sorry @alvenchen, I don't quite understand what you're asking for |
@roblourens Thanks for reply.I wonder is there any convenient way to use global search when searching "current file" or "all open file". |
Expanding this to cover searching open files or searching git modified files, or some other class of files. Edit - Does github not show title edits in the history anymore? |
I would also request that you define separate command for starting a search in each search scope, so i can map separate keyboard shortcuts for searching in the different scopes (current file, current folder, open files, all files, etc.). If we have that, it would suffice to cover the use case i requested in #40523, which you've closed. |
Any word on this? I don't see much progress for this feature request. To clarify, we're looking for something like this: Kind of dropdown menu that allows you to select the search scope in the search panel. Possible search scopes can be: In addition, expose a command for each search scope to allow initiating a search in that scope quickly through keyboard shortcut. |
@yuval-gilboa That would be great. In addition to the fields you have listed, I would imagine custom search scopes (where user defines exclude/include files) also being available. "tests", for example, would be a good custom scope. I have a separate issue opened for custom search scopes #42350. |
Friendly bump, I'd love to have this. Thank you! |
This is necessary as I use it all the time in VS.NET |
@roblourens Do you think limiting the scope of the "files to include" field, to the current files/files would be enough to accomplish this? I already have a version of VSCode where i have modified it to do this. I can submit a PR soon if you think that's enough. |
I don't understand, so if you type in "files to include", it would only search using that pattern in open fils? |
@malfusion I like the idea, but wouldn't that discard all the unsaved changes in the editor? (also slower because of i/o) |
@roblourens so the "files to include" is a glob pattern that is searched. So the trick here would be to find the files that are required, generate the glob pattern and then update the "files to include" field with it. And the search would only search the matching files. @atif089 if the question meant "would the search disregard the current file's unsaved changes", then I'm not sure yet. I'll have to check. But to my knowledge, the search is performed directly on the file system, so only saved changes might be searched. |
was amazed (in bad sense of this word) to discover VSCode cannot do it... it's 2018 after all, seems to be a common sense feature present in any other code editor or IDE.. bumping the issue to attract attention to it. |
+1 |
Is this issue to ambitious? Will it make sense to open a separate issue for the "search on git modified files" for example? |
Rod, check out this link
<https://www.barebones.com/products/textwrangler/download.html> for
TextWrangler (earlier version) and BBedit (latest version) for Mac, both
from the same authors . Make sure your version of macOS works - read up on
details in site.
…On Mon, Aug 23, 2021 at 11:51 AM Rodney S. Foley ***@***.***> wrote:
So is the gist of this is that there is no way to search the scope of all
open tabs especially ones that are new data and have never been saved so
are not a real file in a known location yet?
On a Mac I am trying to find a replacement for Notepad++ and one of the
features I use with that all the time is searching all my open tabs, that
they call on a button "Find All in All Opened Documents" VS Code has been
fairly good as a replacement for my use as this appears to be the only
feature missing is that I cannot search only the open tabs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#20530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL62BVDZYSCLEPGFQNV2ME3T6JVA5ANCNFSM4C73QHNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
@JacksonKearl The original motivation behind this request was to address the inherent usability problem of having two different search mechanisms in vscode - one on the sidebar and one inside the editor - which results in two sets of search boxes, two sets of search result highlights (overlapping each other and confusing), two sets of keyboard navigation commands (F3 and F4), and a lot of redundant typing and clicking just to switch from one search mode to the other. Not to mention all the accessibility issues that this duality creates. The new version solves only part of the problem (i.e., search in specific folder / open files), but can easily be extended to cover all the other aspects by changing the "Search only in Open Editors" button from a toggle button to a dropdown button that opens a menu like below. The "files to include" field becomes a combobox that allows quick switching between the different search scopes, including also the recently-used search paths. Up/down arrows can still be used to rotate through this list, but in addition it should be possible to assign keyboard shortcuts for the special search paths (current file, open files, etc). If this is implemented then it becomes possible to do all searches from single central location, use same shortcut keys to navigate all kind of searches, and have single keystroke/click to switch between the search modes. 5 years since this request was opened, i'm wandering whether this will ever come. |
I completely agree with @yuval-gilboa. But I love being able to quickly search into the current opened file with a simple |
Good point from @yuval-gilboa. Also agree to @popod. The universally-known
concept of using ctrl+f must be made available at all times and applicable
to current viewed file. Perhaps a ctrl+F+O would make sense to also search
opened files? And maybe ctrl+F+F to search in the currently used folder?
Shortcuts like these would represent most used searching events, without
having to access a menu. And if one needs finer control, then access to a
menu would suffice, offering item-clicking and keyboard shortcut list of
all available search events.
…On Fri, Feb 4, 2022 at 3:30 PM popod ***@***.***> wrote:
I completely agree with @yuval-gilboa <https://github.com/yuval-gilboa>.
But I love being able to quickly search into the current opened file with a
simple ctrl+f ! It's so useful that I don't think it should be removed.
—
Reply to this email directly, view it on GitHub
<#20530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL62BVBSUYE26TB2U5ZTLFLUZQZPJANCNFSM4C73QHNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Good point @yuval-gilboa. Also agree to @popod. The universally-known
concept of using ctrl+f must be made available at all times and applicable
to current viewed file. Perhaps a ctrl+F+O would make sense to also search
opened files? And maybe ctrl+F+F to search in the currently used folder?
Shortcuts like these would represent most used searching events, without
having to access a menu. And if one needs finer control, then access to a
menu would suffice, offering item-clicking and keyboard shortcut list of
all available search events.
…On Thu, Feb 3, 2022 at 9:40 PM yuval-gilboa ***@***.***> wrote:
@JacksonKearl <https://github.com/JacksonKearl>
The new search version is certainly an improvement, thanks for that. But
the main point of this feature request is still missed.
The original motivation behind this request was to address the inherent
usability problem of having two different search mechanisms in vscode - one
on the sidebar and one inside the editor - which results in two sets of
search boxes, two sets of search result highlights (overlapping each other
and confusing), two sets of keyboard navigation commands (F3 and F4), and a
lot of redundant typing and clicking just to switch from one search mode to
the other. Not to mention all the accessibility issues that this duality
creates.
The new version solves only part of the problem (i.e., search in specific
folder / open files), but can easily be extended to cover all the other
aspects by changing the "Search only in Open Editors" button from a toggle
button to a dropdown button that opens a menu like below. The "files to
include" field becomes a combobox that allows quick switching between the
different search scopes, including also the recently-used search paths.
Up/down arrows can still be used to rotate through this list, but in
addition it should be possible to assign keyboard shortcuts for the special
search paths (current file, open files, etc).
If this is implemented then it becomes possible to do all searches from
single central location, use same shortcut keys to navigate all kind of
searches, and have single keystroke/click to switch between the search
modes.
5 years since this request was opened, i'm wandering whether this will
ever come.
Should a separate issue be opened for this?
[image: image]
<https://user-images.githubusercontent.com/4710322/152460752-71e2b898-5c60-4756-a891-e43afd1d771e.png>
—
Reply to this email directly, view it on GitHub
<#20530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL62BVBL5SPX3WK5VNNFVW3UZM4ARANCNFSM4C73QHNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Linking to #75220, which is basically the same request. |
Boy, would I love to have this feature. My main use case is "search in git changes"; I quite frequently find myself searching for stuff in current git changes (whether staged or unstaged) but there isn't really a good way to do it right now. I wish this mockup also included "current Git changes" for clarity! |
«modified files» makes enough sense to me BTW, was just dreaming about this feature just now, and you bumped it 😄 my use case was just now: search through newly added but of course there's zillion other use-cases than just mine |
find a good extension to support in diff: |
When I'm using the extension cmake I would love to search in all the files that the extension cmake Discovered. You should offer the possibility to the developper of extension the ability to add a group of files in the search menu |
Add the ability to save (customize) searches and search locations. Particularly saving presets in "Files to include", "Files to exclude" would be extremely useful. I think this request deserves a separate github issue but I see that these get closed as duplicates so I'm typing it here. |
try my extension: https://github.com/tjx666/power-edit#search-in-git-changed-files 2024-04-21.18.49.15.mov |
I came across this issue because I wanted to search for let's say all files that have PureComponent and within those files all instances of . If that's your scenario no need for an extension or for this, but you do need to trick the regex search into giving you /m (multi-line search).
This is because the next search is inefficient and it doesn't help to run it twice. (It can also confirm that the regex search is working as expected.)
To find all files that use PureComponent (as an example) you can use the regex mode search: ([.*] button in the search)
This option is pretty quick and easy to use, but your computer will struggle with how apparently inefficient the regex search is. |
Steps to Reproduce:
1.when i use global search, it's not easy to type whole file path and name in input box,
hope that there is a convenient way to use highlight in search current file by typing ""
Note from @roblourens This includes searching in any particular subset of files such as
etc
The text was updated successfully, but these errors were encountered: