Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to show files before folders in Visual Studio Code?

I know it's a stupid question but I would like to know if this is possible doing some configurations.

The VSCode by default show the folders first

like image 396
Leonardo Lima Avatar asked Mar 19 '18 13:03

Leonardo Lima


People also ask

How do I see all files in Visual Studio Code?

VS Code allows you to quickly search over all files in the currently opened folder. Press Ctrl+Shift+F and enter your search term. Search results are grouped into files containing the search term, with an indication of the hits in each file and its location.

How do I see all files in a folder in Visual Studio?

In Visual Studio 2022 and later, you can set Visual Studio to always keep results. Go to Tools > Options > General > Find and Replace, and select the checkbox for Keep search results by default.


3 Answers

Yes you can do that. Just add the following entry to your settings.json:

"explorer.sortOrder": "filesFirst"

An overview of all possible settings can be found here.

like image 68
HaaLeo Avatar answered Nov 25 '22 05:11

HaaLeo


If some comes across this, like me looking for the other way around. Having folders first and files second. User "explorer.sortOrder": "foldersFirst" in your settings.json.

like image 23
Antoine Henrich Avatar answered Nov 25 '22 05:11

Antoine Henrich


File > Preferences > Settings > Search sort order

VS Code Settings

like image 22
Sohail Ahmed Avatar answered Nov 25 '22 04:11

Sohail Ahmed