From the course: Visual Studio Code Productivity Tips

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Favorite extensions: Sort lines

Favorite extensions: Sort lines - Visual Studio Code Tutorial

From the course: Visual Studio Code Productivity Tips

Start my 1-month free trial

Favorite extensions: Sort lines

- [Instructor] As a group, developers are opinionated about how we like our code to be arranged. If you're the type of developer who likes to have your code in a particular order, especially alphabetical order, then I've got an extension for you. It's called the Sort lines extension. You can find it in the marketplace by looking for Sort, this one here. Once it's installed, you can go to your code. Here I've got several lines of variable declarations, you'll notice that they're not in alphabetical order. I can then press the keystroke or use the Command bar to run the sort algorithm. So I'll press F1, type in Sort, and here's the standard key binding for this extension, F9. We'll sort the lines in ascending order in a case-sensitive fashion. So let's try that. Return back to the 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. This works for any lines of text. Down here in line 13 and 14, I have two…

Contents