kitesi / scoped-sort Goto Github PK
View Code? Open in Web Editor NEWA fetaure rich text sorter that takes indentation into account. Available on vscode, npm, the cli and a website.
Home Page: https://scopedsort.netlify.app/
License: MIT License
A fetaure rich text sorter that takes indentation into account. Available on vscode, npm, the cli and a website.
Home Page: https://scopedsort.netlify.app/
License: MIT License
Thanks for this extension. I'd like to use it with YAML using sort-start
and sort-end
comments. Is this possible now or am I making a feature suggestion?
packages:
# sort-start --regex /[^\/]/
- ./pkg-test/
- ./pkg/
# sort-end
This program assumes the first non blank line of the given text is the outermost indentation level.
Examples:
- some text
- follow up
- subtext
- other text
- this also works
- fine
- aswell
- subtext
These both sort fine, but what doesn't work is if you go a level back from the starting indentation.
- this also works
- fine
- aswell
- subtext
- now I'm here
It's not clear what the expected sort should be here. Possibly moving the last line to the first line, but that would make all the other lines look like children of "now I'm here".
For now it's undefined behavior, and your text probably shouldn't be formatted in this way anyways.
Vscode Web Extension:
https://code.visualstudio.com/api/extension-guides/web-extensions
Open VSX:
Thumbs up react if you would like this project to support vscode web extensions, smiley face react if you would like support for open vsx support.
Hello. I had a use-case and I've searched a lot of extensions but was unable to find an appropriate one. Wondering if this can achieved using yours!
So I have a bunch of HTML blocks like this:
<div class="parent">
<div class="child">
<h3>Zachary Garrett</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Elijah Tyler</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Earl Henry</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Herman Reed</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
</div>
I want to sort the .child
blocks according to the h3
values. So the result would look like:
<div class="parent">
<div class="child">
<h3>Earl Henry</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Elijah Tyler</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Herman Reed</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
<div class="child">
<h3>Zachary Garrett</h3>
<p>foo bar baz</p>
<div class="something">
lorem ipsum
</div>
</div>
</div>
Can I achieve that somehow using this extension? Thanks.
I love the idea of Sort on Save, but started noticing weird changes to files not marked with the { sort-start } section.
Didn't realize this would be applied to a whole file if the section was not applied, which is not an expected experience.
I had to turn off this feature and return to manually highlighting and sorting a section.
Please provide a means of sorting a whole file if the { sort-start } section is not defined.
The following markdown task list had been sorting correctly until the recent update.
Now the first lines of each grouping are shifting down one. i.e. - [x] (a0)
shifts into the - [ ] (a1)
location, and that line shifts down to
Note: I have removed my own content of each task, but this process had previously sorted correctly so that I could mark things as done and the next undone task would sort to the top.
Provider: VS Code Extension
Version: v3.0.0
Options: Format Sections on Save - using the sort options within the comment
<!-- { sort-start -r } -->
- [x] (a0)
- [x] (1)
- [x] (2)
- review [open tasks](searches\open-tasks.code-search)
- [x] (3)
- [x] (4)
- [x] 1)
- [x] 2)
- [x] 3)
- comment 1
- comment 2
- comment 3
- [x] 4)
- [x] 5)
- comment 1
- comment 1.a
- [ ] (a1)
- comment 1
- comment 1.a
- comment 2
- comment 3
- [ ] (z)
- [ ] (1)
- comment 1
- comment 1.a
- [ ] (2)
comment 1
- comment 2
- [ ] (3)
- [ ] (4)
- [ ] (5)
- comment 1
<!-- { sort-end } -->
<!-- { sort-start -r } -->
- [x] (1)
- [x] (2)
- review [open tasks](searches\open-tasks.code-search)
- [x] (3)
- [x] (4)
- [x] 1)
- [x] 2)
- [x] 3)
- comment 1
- comment 2
- comment 3
- [x] 4)
- [x] 5)
- comment 1
- comment 1.a
- [x] (a0)
- comment 1
- comment 1.a
- comment 2
- comment 3
- [ ] (a1)
- [ ] (1)
- comment 1
- comment 1.a
- [ ] (2)
- comment 2
comment 1
- [ ] (3)
- [ ] (4)
- [ ] (5)
- comment 1
- [ ] (z)
<!-- { sort-end } -->
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.