42

Is it possible to sort functions by name in Visual Studio Code ? I mean, using a keyboard shortcut or even an extension.

Precision: I'm spaeking about sorting the functions in the panel code editor.

JarsOfJam-Scheduler
  • 2,809
  • 3
  • 31
  • 70

3 Answers3

32

If you are here looking for a way to change the order of the symbols list for the breadcrumbs (as I was), you can do that via breadcrumbs.symbolSortOrder setting (in Visual Code > Settings).

Gedeon
  • 742
  • 9
  • 13
29

Are you aware of the Outline view in the Explorer panel? You can sort by various categories.

See demo. I have sorted by Type to get all the functions together and they are alphabetical.

outline view

Mark
  • 143,421
  • 24
  • 428
  • 436
4

If you are using TypeScript, take a look at member-ordering rule and alphabetize option in tsLint. for other languages like C#, there are probably extensions out there but I haven't looked them up myself.

Amir Shirazi
  • 706
  • 8
  • 9