Tyriar / vscode-sort-lines

Visual Studio Code extension to sort lines of text
https://marketplace.visualstudio.com/items/Tyriar.sort-lines
MIT License
146 stars 42 forks source link

feature request: Ignore commented lines #96

Open TL-Garcia opened 3 years ago

TL-Garcia commented 3 years ago

Hey there, thanks for the awesome plugin!

It'd be really nice to be able to ignore commented lines when sorting, since many times comments are interspersed in the code.

For example, turning this:

const props = {
  onAsyncCallback,
  // handles calls to X API 
 isOpen,
 // toggles modal
 bar: true,
 // does nothing
}

Into this:

const props = {
  bar: true,
  // does nothing
  isOpen,
  // toggles modal
  onAsyncCallback,
  // handles calls to X API 
}