Sublime Forum

Project Folder Sorting

#1

Why does a folder named 10 appear first than a folder named 9 in the project sidebar??

1 Like

#2

Because of the sorting algorithm they are using:

lexicographic sorting which means basically the language treats the variables as strings and compares character by character (“200” is greater than “19999” because ‘2’ is greater than ‘1’)

1 Like

#3

Uhh… that’s not very productive, at least not in my case…

How can I change it?

0 Likes

#4

Any suggestion?

0 Likes

#5

As Sublime Text is closed source, and this behavior is controlled by its closed source code, I would suggest you:

  1. Wait for some months, perhaps years, may be for ever, until they decide to change it or provide an API for packages to custom this behavior
  2. Try the https://github.com/Microsoft/vscode which is pretty much similar to Sublime Text, however it is open source, then even if it is not working as you like, you can fix it.
1 Like

#6

Or just use 09 instead of 9, bonus it now works for every other program now, because this is literally the default behavior of any software

1 Like