Skip to content

Cannot search specific file types anymore #29760

Closed

Description

  • Open vscode
  • Right click on src
  • Choose Find in Folder
  • 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

1.13:
screen shot 2017-06-28 at 15 53 55

Code - Insiders 1.14.0-insider (63def6e, 2017-06-28T05:07:46.148Z):
screen shot 2017-06-28 at 15 51 45

Activity

  1. added
    bug
    search
    on Jun 29, 2017
  2. added this to the June 2017 milestone on Jun 29, 2017
  3. roblourens commented on Jun 29, 2017

    @roblourens
    Member

    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
  4. modified the milestones: Backlog, June 2017 on Jun 29, 2017
  5. roblourens commented on Jun 29, 2017

    @roblourens
    Member

    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.

    We discussed Slack-style search UI

    image

  6. modified the milestones: July 2017, Backlog on Jun 29, 2017
  7. alexdima commented on Jun 30, 2017

    @alexdima
    MemberAuthor

    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/src with src every 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)
    • etc. etc.
  8. added
    important
    on Jun 30, 2017
  9. alexdima commented on Jun 30, 2017

    @alexdima
    MemberAuthor

    fyi Sandeep Somavarapu (@sandy081) Benjamin Pasero (@bpasero) if you know where to write the if statement.

  10. 14 remaining items

  11. bpasero commented on Jun 30, 2017

    @bpasero
    Contributor

    Fair enough.

  12. sandy081 commented on Jun 30, 2017

    @sandy081
    Member

    Created #29924 for multi-root set up

  13. changed the title [-]Multi root: Cannot search specific file types anymore[/-] [+]Cannot search specific file types anymore[/+] on Jun 30, 2017
  14. bpasero commented on Jun 30, 2017

    @bpasero
    Contributor

    Me too: #29925

  15. isidorn commented on Jun 30, 2017

    @isidorn

    Seems to work fine with latest unreleased insiders

    screen shot 2017-06-30 at 14 05 37

  16. alexdima commented on Jun 30, 2017

    @alexdima
    MemberAuthor
  17. locked and limited conversation to collaborators on Nov 17, 2017
  18. added a commit that references this issue on Sep 6, 2026
    5bdfda9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugimportantsearchverifiedworkbench-multiroot

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions