Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code : Sort functions by name?

Tags:

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.

like image 278
JarsOfJam-Scheduler Avatar asked Jan 13 '20 14:01

JarsOfJam-Scheduler


People also ask

How do I sort alphabetically in VS Code?

Select my lines of text. Press F9. Keep your eyes on the code, you'll see a change. And now it's in alphabetical order.

How do I sort text in Visual Studio?

You just select the lines you want to sort and Alt+3 or Alt+4 (asc/desc).

How do I sort a method in Visual Studio?

To sort your file, open the file via solution explorer: Right click the open file. Code Maid menu (likely near the top of the right click menu) Click Reorganize Active Document.


1 Answers

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

like image 137
Mark Avatar answered Sep 23 '22 18:09

Mark