The "open file" dialog in Visual Studio Code is not showing hidden files. For example, when looking at my home directory, none of the . files are shown:

Enter image description here

I did look through the settings.json file, but I did not find any applicable setting. So - how do I configure Visual Studio Code properly?

8 Answers

On Mac you can hit cmdshift. in the open file dialog, to see hidden files.

(Source)

7

go to file -> preferences -> settings

and in the search bar, search for "files.exclude"

then delete whatever json setting that you don't want to hide that specific file

1

Under Linux you can right click on files in the file selection window and check the "Show Hidden Files" checkbox.

Here's a screenshot from Ubuntu 20.04.1 LTS, VS Code v 1.52.1 after right clicking on the header.php file with "Show Hidden Files" option enabled: Linux VS Code Open File Dialogue Box Hidden Files Option

3

To display hidden .git directories in Visual Studio Code, do the following:

On Windows or Linux, select File → Preferences → Settings.

On Mac, select Code → Preferences → Settings.

In Visual Studio Code settings (Settings Editor), select Editor → File and scroll to (or search for) Exclude. Comment out the glob to exclude .git files (// **/.git). See the attached screenshot: VS Code glob commenting.

Also see Visual Studio Code User and Workspace Settings. You will find the default settings on the page, which you could edit, but I chose to comment the glob out to conveniently hide these files later should I so desire.

Visual Studio Code: Show hidden folders contains more information on the subject.

1

On Windows, in VS Code, go to File > Preferences > Settings.

Search file.exclude and hover over the hidden files you want to see and click the "X"

Figure 1

Figure 2

1

On Windows, open the .vscode folder in the explorer and comment out the file types you wish to see. There is no need to restart VS Code, just click the refresh explorer button.

enter image description here

1

Linux:

ctrl + ","

in search, type: "files exclude"

This shows all the patterns VS Code uses when deciding what to ignore. If you wanted to view a .git folder, you would simply remove that pattern from the list of patterns "**/.git". When you want to stop seeing it, just add that pattern back.

In menu View in Visual Studio Code, select SCM (shortcut Ctrl + Shift + G), right click on the Git icon, click here and select Keep.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy