35

In my project I have files labeled as such day1.txt, day2.txt, day3.txt, etc.

Now in my normal file system they are listed in the correct order:

day1.txt
day2.txt
....
day10.txt
day11.txt

In VS Code they are listed like so:

day1.txt
day10.txt
day11.txt
day2.txt
day3.txt

Is there a setting somewhere to change this? It is driving me mad.

I've given the settings a search and I didn't see any obvious parameter to change that would affect this.

3 Answers 3

47

Yes there is a way.

In your Settings (File → Preferences → Settings) search for: explorer.sortOrder

A small pen will appear on the left side of the setting. Select the way you want to sort the files. There are five options available:

  1. Default
  2. Mixed
  3. Files first
  4. Type
  5. Modified

enter image description here

3
  • Is it possible to do this in only specific directory (e.g. /src and its children)? Commented May 17, 2018 at 21:23
  • For .go files, the type option will allow your test files to be listed after your code files.
    – gngchrs
    Commented Apr 3, 2019 at 11:20
  • 4
    Is it possible to reverse the order? My filenames begin with a date and I want them in descending order with the most recent date on top.
    – Levi
    Commented May 9, 2019 at 9:30
1

Unfortunately, there's no option that will allow you to sort all of the open editors alphabetically.

0

No, unfortunately there's no such option as of yet, but there's already a feature request.

Not the answer you're looking for? Browse other questions tagged or ask your own question.