Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bettercallshao/indent-sorter
https://github.com/bettercallshao/indent-sorter
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bettercallshao/indent-sorter
- Owner: bettercallshao
- License: mit
- Created: 2024-04-29T00:53:30.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T01:48:14.000Z (2 months ago)
- Last Synced: 2024-10-02T09:16:22.457Z (about 1 month ago)
- Language: TypeScript
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# indent-sorter
A Visual Studio Code extension that sorts blocks of highlighted code grouped by indentation. Sorting is keyed on the first line in the block that is not a comment.
## Example
Before
```ruby
# comment
z_is_not_a_method# This is a ruby comment
def B
call_method
enddef A
# empty method
end
```After
```ruby
def A
# empty method
end# This is a ruby comment
def B
call_method
end# comment
z_is_not_a_method
```![demo](https://i.imgur.com/KjvZYsY.gif)
More examples in [src/test/indent-sorter/](src/test/indent-sorter/)