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

Simple way to temporarily turn off exclusions for QuickOpen files #15604

Open
chrmarti opened this issue Nov 17, 2016 · 25 comments
Open

Simple way to temporarily turn off exclusions for QuickOpen files #15604

chrmarti opened this issue Nov 17, 2016 · 25 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities quick-open Quick-open issues (search, commands) search Search widget and operation issues
Milestone

Comments

@chrmarti
Copy link
Collaborator

Using a transpiled language I sometimes find the need to look at the transpiled code which typically is excluded from QuickOpen. Having a simple way to turn exclusions off would simplify this. Some options come to mind:

  • Have a 'Turn Off Exclusions' entry at the end of the results list.
  • Have an additional QuickOpen prefix that runs QuickOpen with exclusions turned off.
  • Have an option toggle next to the QuickOpen entry field to turn exclusions off.
@chrmarti chrmarti added feature-request Request for new features or functionality search Search widget and operation issues labels Nov 17, 2016
@bpasero
Copy link
Member

bpasero commented Nov 17, 2016

@chrmarti what I typically do is to copy the full path of the TS file and then replace src with out and ts with js. Quick open will never filter if you put the full path in.

@bpasero bpasero removed their assignment Nov 17, 2016
@innerlee
Copy link
Contributor

But it still filters if I put a path relative the project root. e.g., ./.gitignore.

@roblourens
Copy link
Member

This is like the button we have in the search view. I have wanted this but I don't want to put a button in our nice minimal quickopen view. How about a separate command, "Go to file (without ignore files and excludes)...". That would be easy for someone to do and low impact. So I'm keeping it open and adding help-wanted.

@roblourens roblourens self-assigned this Oct 8, 2019
@roblourens roblourens added the help wanted Issues identified as good community contribution opportunities label Oct 8, 2019
@roblourens roblourens added this to the Backlog milestone Oct 27, 2019
@johnnytemp
Copy link

johnnytemp commented Feb 6, 2020

Or furthermore to a new command, may the default Quick Open action able to show the file item if the path entered is a full existing relative path to the project root?

I feel it quite strange & stupid, to discover that "Quick Open" cannot find the file I want, even I gave the full relative path, which is the almost-complete hint. :-/ (Always needing to copy from or make an absolute path is tedious)

@bpasero
Copy link
Member

bpasero commented Mar 23, 2020

Quick open always allowed to put the full absolute path into the input box to show this file, even if exclusion lists are defined to exclude it. With the new work on quick open I also expanded this support for relative paths. E.g. if you type some/excluded/path/file.txt and it would result in a match against any of the workspace's folders, the result would appear.

I wonder if this is good enough for most cases.

@roblourens
Copy link
Member

roblourens commented Mar 23, 2020

@bpasero we used to have that feature for relative paths, I removed it at some point just for simplicity, bringing it back is fine too 😁

I personally think it would be ok to out-of-scope this issue, especially with this workaround with relative paths

@bpasero
Copy link
Member

bpasero commented Mar 24, 2020

@roblourens I was not aware of that, any reason you removed it? Was it producing bad results?

@roblourens
Copy link
Member

roblourens commented Mar 25, 2020

I think I was refactoring and got annoyed by having to check the disk on every keystroke before a search can start, because any query can be a valid relative path. Also @chrmarti and I didn't think it was generally known about or used much. Can you link the commit where you implemented it for my curiosity? If perf is ok I have no issue with keeping it.

@bpasero
Copy link
Member

bpasero commented Mar 25, 2020

@roblourens oh, I am only considering relative path results if a path separator is included in the query, such as / or \. The code is:

private async getRelativePathFileResults(query: IPreparedQuery, token: CancellationToken): Promise<URI[] | undefined> {

@roblourens
Copy link
Member

Oh so here the search is still triggered at the same time, and exact relative matches (ignoring excludes) are just sorted to the top. I like this better.

@bpasero
Copy link
Member

bpasero commented Mar 29, 2020

@roblourens well, they will be sorted to the top because they match better. But yeah, that is basically it.

@gopalkriagg
Copy link

I will really like this for PHP development. I use PHP Laravel framework, and sometimes I want to look into the source code of Laravel. If I try to Quick Open the file by typing file name it doesn't show up unlike PHPStorm. I looked for some button in the QuickOpen panel to also allow searching from gitignored files but there is no such button.

What I do is remove /vendor folder from .gitignore temporarily to make it work which is not very convenient.

Please implement this feature!

Thank you for the great editor btw! 🙏

@jpenna
Copy link

jpenna commented Apr 25, 2020

A suggestion to do this is using a prepended symbol before the path (#95918 ), it would turn on/off the search for excluded files, and it wouldn't need any "intelligence" on the IDE side.

@gopalkriagg
Copy link

@jpenna Is that symbol decided? Because my VSCode doesn't seem to react to ~ or ^ #95918 is closed because it is duplicate of this issue.

@itggot-linus-styren
Copy link

Would be really useful to check the built .c files for errors.

@jpenna
Copy link

jpenna commented Apr 30, 2020

@jpenna Is that symbol decided? Because my VSCode doesn't seem to react to ~ or ^ #95918 is closed because it is duplicate of this issue.

It's just a suggestion, I will make it more clear in the message, sorry

@joeystdio
Copy link

In an angular project we have a config.json where we setup environment specific urls. This file is ignored from version control so currently impossible to CTRL+P to it.

@Maximetinu
Copy link
Contributor

in my projects there are many autogenerated files so this would be great

@ifeltsweet
Copy link

I think it should be a separate command so that we can bind a keyboard shortcut to it, for example, "ctrl+cmd+p".

@bersbersbers
Copy link

I can add that in any LaTeX project, one usually has a single .log file, a single .blg file, a single .aux file, and so on. So I would definitely welcome being able to Ctrl+P, .log and not having to type the output directory and project name at all. Having to copy/type an absolute, or even relative path to the file would be unnecessarily complex in my use case.

If there was some QuickOpenWithExcludes, I would probably bind it to Ctrl+P and never use QuickOpen again.

@bpasero bpasero added quick-open Quick-open issues (search, commands) and removed quick-pick Quick-pick widget issues labels Apr 7, 2021
@andrewplummer
Copy link

In addition to generated files, I'm often going into node_modules. For most cases I want this excluded (based on my .gitgnore), but would definitely help to quickly turn it off to access those packages.

@TylerLeonhardt TylerLeonhardt self-assigned this Oct 4, 2021
@matte-esse
Copy link

Please do add a command for Go to File... without exclusions! or maybe a special character to put in the Go to File... search box before the file name, as such: ~excluded_file.ext

@SharakPL
Copy link
Contributor

SharakPL commented Jun 2, 2022

"search.exclude": {
    "**/node_modules": true,
    "**/node_modules/bootstrap/scss": false,
    "**/bower_components": true,
    "**/*.code-search": true
  },

Following @mjbvz's advice I tried to make Bootstrap scss files searchable, but it doesn't work :( Would be great if it could work maybe like this:

  • starting search string with ! eg. !_mixins would search also node_modules directory for _mixins
  • starting search string with !! eg. !!_mixins would search whole workspace for _mixins including all search.excluded and all .gitignored locations

If that is too confusing since !=='not' then maybe labels would be better:

  • node:_mixins would search only node_modules
  • vendor:_mixins would search only vendor, etc.
  • all:_mixins would search whole workspace

@jzyrobert
Copy link
Contributor

Hello, I had a go at implementing this through a search prefix (! but could be anything not already used) and a command (both in the palette and using Ctrl + Alt + P).

Have a look and see if you have any feedback for it

@danielo515
Copy link

While having a 'keyword' to include certain 'kinds' of ignored files, I think there is value in having a per-workspace configuration of files to include (ignore the fact they are in the gitignore).
In my workspace we have several files that are always gitignored, but they are regular work files you want to always be able to quickly jump into. I don't want to open the search-bar with bloated list of potential matches just to quick-jump into one of our 5 or 6 files that are git-ignored but need to be edited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities quick-open Quick-open issues (search, commands) search Search widget and operation issues
Projects
None yet