How do I hide certain files from the sidebar in Visual Studio Code?

前端 未结 8 1199
终归单人心
终归单人心 2020-11-27 08:56

Using Microsoft\'s Visual Studio Code, how do I hide certain files and file patterns from appearing in the sidebar?

I want to hide .meta and .git<

8条回答
  •  萌比男神i
    2020-11-27 09:24

    Sometimes you just want to hide certain file types for a specific project. In that case, you can create a folder in your project folder called .vscode and create the settings.json file in there, (i.e. .vscode/settings.json). All settings within that file will affect your current workspace only.

    For example, in a TypeScript project, this is what I have used:

    // Workspace settings
    {
        // The following will hide the js and map files in the editor
        "files.exclude": {
            "**/*.js": true,
            "**/*.map": true
        }
    }
    

提交回复
热议问题