You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-prioritysearchSearch widget and operation issuesverifiedVerification succeededworkbench-multirootMulti-root (multiple folders) issues
this used to pop up the search viewlet with ./src in the files to include. It used to be able for me to append /**/*.ts to that value (i.e. ./src/**/*.ts) to search only in TypeScript files.
this is no longer possible: /Users/alex/src/vscode/src/**/*.ts never finds anything
please note that I do not have multiple folders opened
I'm actually not sure I can support this in a reliable way. I would have to search the full disk, applying a full path glob to every file. Or, I would have to separate the path portion from the glob portion, but you can't do that since there is overlap between glob syntax and valid file names.
I could notice that a pattern has a prefix of a root folder's path, but if it works for workspace folders, it should work for any folder.
Workarounds:
/foo/bar, **/*.ts (with glob enabled) works for the same result
Or just src/**/*.ts will also give the same result
Next month I'll revisit this and think about UI/shorthand for searching in a root folder. Maybe vscode/src/**/*.ts should give this result, or maybe there should be special UI to indicate that this is in the vscode root.
This is a regression from 1.13, not a feature request. I am not asking for this to work in the multi-root case. Notice how my steps above include running an action from the explorer that existed in 1.13, "Find in Folder".
If only a single folder is opened, the "Find in Folder" should populate the "files to include" in the same way as 1.13, to allow for a core search feature to continue working (i.e. finding results in a certain file type).
i.e. if the workaround is for me to manually replace /Users/alex/src/vscode/src with srcevery single time I run the "Find in Folder" action, then why doesn't the action do that to begin with, if the new full path thing is broken?
IMHO this should be also trivial to fix, with an if statement, that in the case of a single opened folder, populates the "files to include" with the relative path, and not with the full folder path, where searching in a file type does not work.
Example of searches/tasks that I do often:
find a class name used in .css in the src/vs/editor folder
find usages of window in .ts in the src/ folder (exclude extensions)
bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-prioritysearchSearch widget and operation issuesverifiedVerification succeededworkbench-multirootMulti-root (multiple folders) issues
Activity
roblourens commentedon Jun 29, 2017
I'm actually not sure I can support this in a reliable way. I would have to search the full disk, applying a full path glob to every file. Or, I would have to separate the path portion from the glob portion, but you can't do that since there is overlap between glob syntax and valid file names.
I could notice that a pattern has a prefix of a root folder's path, but if it works for workspace folders, it should work for any folder.
Workarounds:
/foo/bar, **/*.ts(with glob enabled) works for the same resultsrc/**/*.tswill also give the same resultroblourens commentedon Jun 29, 2017
Next month I'll revisit this and think about UI/shorthand for searching in a root folder. Maybe
vscode/src/**/*.tsshould give this result, or maybe there should be special UI to indicate that this is in thevscoderoot.We discussed Slack-style search UI
alexdima commentedon Jun 30, 2017
roblourens
This is a regression from 1.13, not a feature request. I am not asking for this to work in the multi-root case. Notice how my steps above include running an action from the explorer that existed in 1.13, "Find in Folder".
If only a single folder is opened, the "Find in Folder" should populate the "files to include" in the same way as 1.13, to allow for a core search feature to continue working (i.e. finding results in a certain file type).
i.e. if the workaround is for me to manually replace
/Users/alex/src/vscode/srcwithsrcevery single time I run the "Find in Folder" action, then why doesn't the action do that to begin with, if the new full path thing is broken?IMHO this should be also trivial to fix, with an if statement, that in the case of a single opened folder, populates the "files to include" with the relative path, and not with the full folder path, where searching in a file type does not work.
Example of searches/tasks that I do often:
.cssin thesrc/vs/editorfolderwindowin.tsin thesrc/folder (exclude extensions)alexdima commentedon Jun 30, 2017
fyi Sandeep Somavarapu (@sandy081) Benjamin Pasero (@bpasero) if you know where to write the if statement.
14 remaining items
bpasero commentedon Jun 30, 2017
Fair enough.
sandy081 commentedon Jun 30, 2017
Created #29924 for multi-root set up
[-]Multi root: Cannot search specific file types anymore[/-][+]Cannot search specific file types anymore[/+]bpasero commentedon Jun 30, 2017
Me too: #29925
isidorn commentedon Jun 30, 2017
Seems to work fine with latest unreleased insiders
alexdima commentedon Jun 30, 2017
Thank you Sandeep Somavarapu (@sandy081) ❤️
Fix microsoft#29760