SortList
Cross-language plugin for sorting items in comma-separated lists
Details
Installs
- Total 1K
- Win 662
- Mac 539
- Linux 292
Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
SortList
A cross-language Sublime Text plugin for sorting items in a list. Handles lists without opening and closing list delimiters, and lists with trailing commas. Preserves lists' quote style (single vs. double).
Demo
Installation
From Package Control
SortList
is available via Sublime Package Control. This is the recommended way to install the plugin.
From GitHub
Alternatively, you may install via GitHub by cloning this repository into the Packages
directory under Sublime Text's data directory. For example, on OSX:
cd "~/Library/Application Support/Sublime Text 3/Packages"
git clone https://github.com/kylebebak/sublime_sort_list.git
Usage
Highlight one or more lists and run the command. If the lists can't be sorted exceptions with line numbers will be displayed in the quick panel.
The name of the command is sort_list
. It appears in the Command Palette
as Sort List
. If you want to use it with a minimum of hassle add a shortcut to your .sublime-keymap
.
{ "keys": ["shift+alt+super+o"], "command": "sort_list" }
If you want to change the list delimiter characters, override SortList.sublime-settings.
Tests
From the root directory, run python3 -m unittest discover --verbose
. Some of the tests will fail in Python 2, but the plugin still works fine in Sublime Text 2.
Contributing
Fork it and create a pull request.
Wish List
- reinsert leading and trailing whitespace, including new lines, after sorting the list
- allow for list delimiters with more than one character, e.g.
<%
and%>
.
License
This code is licensed under the MIT License.