You can also find me on Gitlab (Main account)
doi9t / sortby Goto Github PK
View Code? Open in Web Editor NEWA Sublime Text plugin that allows you to sort lines with methods that are not present by default.
License: Apache License 2.0
A Sublime Text plugin that allows you to sort lines with methods that are not present by default.
License: Apache License 2.0
You can also find me on Gitlab (Main account)
Is there a way to use this tool with key bindings?
The same as sort by integer, except for numbers which may contain a decimal point. Note that if implemented in such a way that decimal point is not required, this sort becomes a superset of integer sort.
Possibly due to a recent update (?) but it seems that currently sorting by any method will remove all lines.
Proposal:
Add option to sort each line by how often it occurred
Implementation:
I may implement this later and submit a pull request.
It would be a nice feature to have a "Sort by random" or something, to quickly shuffle all the lines into a random order.
Thanks!
There may be boolean value in a SortBy.sublime-settings
file. Default false
is good I think.
{
"case_sensitive": false
}
I have a tables list that I want to sort by the last letter. Because those tables are classified by suffix.
Hello.
I have a text
"
ัะตัั
ััั
"
Tools -> Doi9t -> SortBy -> Length of lines
error:
Traceback (most recent call last):
File "./sublime_plugin.py", line 356, in run_
File "./sortby.py", line 58, in run
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
In Sublime Text, the default sort function sorts entire lines in selection, not only the selected characters. Could your plugin be configure to behave this same (either by default or using a setting) please? ๐
Is this in the scope of the plugin:
Sorting this by numbers:
* 10
* 11
* 12
* 13
* 14
* 15
* 6
* 7
* 8
* 9
and expecting this result:
* 6
* 7
* 8
* 9
* 10
* 11
* 12
* 13
* 14
* 15
Sometimes I need to sort lines by length, but keeping alphabetical order between the lines with identical length. It can be achieved by sorting alphabetically first and then by the length.
How about creating separate sort mode for this, so we could use just one step instead of two? This way of sorting is very useful if we want to keep the code tidy, for example I like to have PHP's use
statements ordered this way.
When there is not any selection, the plugin can apply the selected sort type to the whole file. This is the default behaviour of the native sorting feature.
Hi. Good plugin: maybe you want make similar for CudaText?
py API is http://wiki.freepascal.org/CudaText_API
You can even make dialog for Sort, dlg_custom..
If I run natural order sort on this set {1,1-1,1-2}, I get the expected sorted order of:
1
1-1
1-2
However, if I do it on the set {1a, 1-1a, 1-2a}, then the sorted order becomes:
1-1a
1-2a
1a
To me at least, I think the natural human sort order for these two sets should be the same, with 1/1a first. Am I alone in this?
Sublime Text provides a functionality via Edit > Permute Selections > Sort
menu. This works like this:
When you select random words from the text and click the sort menu above, it sorts these words in place. Only words switches each other's place. No other text is edited. This functionality can be added to SortBy. However, I agree that this is not an easy thing to implement.
An example: (Bold words represent multiple selection)
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
After the sort: (bolds are sorted and they are still in a selection)
Lorem ipsum dolor sit amet, aliquip adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud consectetur ullamco laboris nisi ut exercitation ex ea commodo
I have recently installed your extension, but since then I could not use Ctrl+Shift+Alt+u shortcut to enter Unicode letters in Sublime Text. That shortcut (alongside with Ctrl+Shift+u, which does not work in ST, at least in ST3+) is used to enter Unicode characters on Linux.
Now I am able to disable a shortcut using (for example) a noop
command, but I am not able to restore the original behaviour (i.e. prior to asigning your command to that shortcut) without editing Default.sublime-keymap
(L68-78) in your repo.
Could your fix this issues please? ๐
For example, I want the list to be sorted in the order below:
"overflow",
"overflow-x",
"-ms-overflow-x",
"overflow-y",
"-ms-overflow-y",
Instead of the following:
"-ms-overflow-x",
"-ms-overflow-y",
"overflow",
"overflow-x",
"overflow-y",
"error_code_21": "Update mode.",
"error_code_211": "Server UnRechable",
"error_code_24": "OPERATION FAILED",
"error_code_349": "Memory failed",
"error_code_4": "Error setting sal session",
"error_code_413": "SIZE EXCEED",
"error_code_414": "UPLOAD FAILED",
"error_code_50": "Error",
"error_code_500": "Error",
I need like below
"error_code_4": "Error setting sal session",
"error_code_21": "Update mode.",
"error_code_24": "OPERATION FAILED",
"error_code_50": "Error",
"error_code_211": "Server UnRechable",
"error_code_349": "Memory failed",
"error_code_413": "SIZE EXCEED",
"error_code_414": "UPLOAD FAILED",
"error_code_500": "Error",
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.