Folders are not excluded from vs code search - visual-studio-code

I want to exclude some folders from search. I've added folders to exclude in both User and Workspace settings, but I'm still getting results from these folders. vs code version is 1.30.2, Windows 10

See search options:
Also note the Use Exclude Settings and Ignore Files toggle button in
the files to exclude box. The toggle determines whether to exclude
files that are ignored by your .gitignore files and/or matched by your
files.exclude and search.exclude settings.
From your screenshot it does not look like the toggle button is set to "Use Exclude Settings..." Toggle that to on and see if your exclude settings work. Highlighted in the gif and already turned on (note the blue focus box surrounding it):

enter image description here
files exclude cannot work when search. You should config in the search exclude

Related

VS Code explorer color file only not directory unless folded?

Is there a way to only color files that have had their git statuses changed and not all parent folders, unless the directory the modified file is in is folded (and color only that folder and not all parents)?
Currently if a file has changed with respect to version control, every folder in the path is also colored, leading to too much color info for my liking:
I'd like everything except for the file someService.ts to be the same color as the models directory.
Also, if possible, all the info on the right (green dots and U) isn't really necessary anymore since the coloring conveys that information, so it's clutter for me. Would it be possible to remove that information and only display the number of errors/warnings in the file?
I have found no built in settings that allows you to set the colors of folders/files individually. It's either all or nothing. To turn the colors on and off, toggle the explorer.decorations.colors setting:
There is a settings to remove the green dots/letters. These are called "badges." To turn them off, toggle the explorer.decorations.badges setting:
This will however also remove the same badges that display the number of errors in a file, etc.

Hide unnecessary folders and files from project panel, in Android Studio

When we create a project in Android Studio there will be many files and folders that not necessary to deal with them while coding.I want to hide it from the project panel and look clean.
How can I hide selected folders and files from the project panel and show them only when I need it?
I want to hide selected folders below, and get them back when needed:
What you can do is to mark the directory as Excluded:
and then disable the option to show them:
or... you can play around with scopes in IntelliJ and select that instead of "Project".
Go to File -> Settings. Then under Editor section, select File Types.
There's a section at the bottom to enter ignored files and folders. This may help you.
https://intellij-support.jetbrains.com/hc/en-us/community/posts/205824519-Is-there-a-way-to-hide-non-project-files-from-project-file-browser

Is there any way that node_modules folder do not expand unecessarily when cmd+click on code in vscode?

When i do cmd+click on something in the code the node_modules folder gets expanded and in order to close it need to go all the way back to the top of that folder which is very annoying.Is there an way to avoid this?
What I usually do is hiding the node_modules from my sidebar..
Go to: File > Preferences > Settings
Search for files:exclude
And fill up the Exclude pattern with node_modules/ and hit OK
This way, I don't need to turn off the auto reveal functionality
In settings, look for Explorer: Auto Reveal
Controls whether the explorer should automatically reveal and select files when opening them.
You currently have it set true, which is the default value. Change the value to false.
Bring up settings with Control-, (comma) and then type reveal ex into the filter.
To scroll to the file that you are editing in the list of files, right-click on the file's tab, then select Reveal in side bar.
I wrote up more information on my blog.
There is a way in vscode v1.74 to exclude specific files and folders from auto-revealing. The new setting is
Explorer: Auto Reveal Exclude
from Auto Reveal Exclude: Release Notes
Allow customization of Explorer autoreveal logic via explorer.autoRevealExclude
The highly upvoted issue Allow to set explorer.autoReveal per
specific folder has been closed with the introduction of a new setting
explorer.autoRevealExclude. This allows for configuring which files
get autorevealed in the explorer if the autorevealing is enabled. The
setting follows the same pattern as files.exclude by also supporting
sibling matching via when clauses.
In fact, node_modules is excluded by default.

Visual Studio Code files.exclude setting not working

I am using Unity and trying to exclude .meta files from the file explorer sidebar. I navigated to File->Preferences->User Settings (or Workspace settings, doesn't matter), and set the contents of the file to the following:
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.meta": true
}
}
...and saved my changes. Yet, when I click the Refresh icon or close/reopen my folder view, I am still seeing all the .meta files showing up in the left pane. Am I doing something wrong here?
My problem was basing my pattern off of the existing ones, which excluded specific file names rather than patterns. I simply needed to add an asterisk before the file extension, i.e.
"**/*.meta"
instead of
"**/.meta"
Check this button if you're seeing excluded files in search.
The cog button needs to be highlighted in order for files.exclude to apply.
It's also worth noting that, in the search sidebar, "files to exclude" and "files excluded through settings" behave differently.
In "files to exclude", it's sufficient to write *.meta, but in "files excluded through settings" (set in the user settings file) you must write **/*.meta.
Follow this path:
C:>Users>UserName>AppData>Roaming>Code>User>settings.json
and remove line '**/.project':true

eclipse hide a item entirely from processing

My requirement: To hide specific file/folder from the project explorer.
Following the steps given on below link, i am able to successfully do so,
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-48b.htm
But, I want to hide them entirely from the processing, e.g. If I do a search for some word in *.java files, results show up from the hidden folder as well. Any way to exclude it from search results (or from entire processing of what eclipse looks for) ?
Resources marked as 'derived' are ignored by most things.
You can set the derived flag on the 'Resource' tab of the file or folder Properties.
You can use the IResource.setDerived method to set the flag programatically.