bizoo / sorttabs Goto Github PK
View Code? Open in Web Editor NEWSort tabs for Sublime Text 2
Sort tabs for Sublime Text 2
Will this be supported in Sublime Text 3? It currently 'almost' works but after a while the left nav gets out of wack, starts hiding files that are there and even selected. Restarting Sublime corrects issue.
Looking for a way to sort by activation date
Related: #3
When having "sort_on_load_save" set to true, the OPEN FILES area of the Side Bar gets messed up when a semi-transient view gets displayed.
(To make clear what I mean with semi-transient view: those views with italic title text as described here.)
"messed up" can mean several things like
Here are a few screenshots, so you get the idea:
Note, in all the screenshots above I had 3 regular files open in Sublime Text, and one semi-transient view.
When tryin to use this plugin in ST3, got this error very often:
plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted
In colsole:
reloading Packages/User/SortTabsInternal.sublime-settings
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 319, in on_deactivated
callback.on_deactivated(v)
File "history_list in /opt/sublime_text/Packages/Default.sublime-package", line 203, in on_deactivated
File "history_list in /opt/sublime_text/Packages/Default.sublime-package", line 32, in push_selection
File "/opt/sublime_text/sublime.py", line 491, in __getitem__
if r.a == -1:
AttributeError: 'NoneType' object has no attribute 'a'
error: plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted
reloading Packages/User/SortTabsInternal.sublime-settings
my config file:
{
// Automatically sort tabs when loading or saving a file.
"sort_on_load_save" : true,
// Command to use for automatic sort.
// If not specified, it use the last used sorting command
// Available defaults command are:
// sort_tabs_by_name
// sort_tabs_by_file_path
// sort_tabs_by_type
// sort_tabs_by_date
// sort_tabs_by_last_activation
"sort_on_load_save_command" : "sort_tabs_by_name"
}
I'm using the commands next_view_in_stack and previous_view_in_stack to navigate views by last activated order.
If I understood correctly, the option Sort Tabs by last activation should be achieving this, however it seems to respond only to views activated via open, palette and sidebar.
Hello, I'm trying SortTabs with Sublime 3 on Windows 7
I want to use it to organize the Open Flies side-bar to keep recent files at the top (or bottom, doesn't really matter)
In my user settings I have
"sort_on_load_save" : true,
"sort_on_load_save_command" : "sort_tabs_by_last_activation",
If I press Ctrl-S to save, it will rearrange the current file to the top of the list, however if I load a file, the new entry appears at the bottom of the list.
The behaviour seems consistent whether I load the file through drag-drop, File->Open, or by clicking on the file in the side-bar.
If there was a way to configure it to sort in the reverse order -- so that upon saving the most recent files went to the bottom, that would be an acceptable workaround since I'm used to the newly-opened files appearing at the bottom. But I didn't see a configuration option for sort order.
Currently tabs are sorted by pane in every pane in the window. I would like an option/setting to be able to restrict the sort to the current pane as I sometimes want a different sort method for the tabs in another pane.
Please add an option to sort numerically, where 2 comes before 10, ideally ignoring file extension (to prevent the extension from also spoiling the numeric sort).
Would be possible to automatically get the tabs sorted by a defined method, when they are opened?
Hi there,
How can I bind a key for sorting the tabs?
Thank you!
Hi,
could you please add option: "sort_on_activation"? It could be just a simple modification in on_activated: https://github.com/bizoo/SortTabs/blob/master/auto_sort_tabs.py#L24.
Thanks!
MΓla
@bizoo this is more of a question than an issue. I was thinking the other day about how SortTabs doesn't really detect the view activation properly when a tab is moved to another group. I had added a complicated workaround that detects these moves properly in a plugin https://github.com/facelessuser/TabsExtra (it uses it for non-sorting purposes).
Well, I thought about back porting the workaround into this plugin (which would require a bit of code, and me figuring out what I originally did and why π ), but I also had a desire to tweak some of the sorting and generally augment it for my own purposes. In the end, I decided to create a manual sorting command built into TabsExtra. But since I didn't design it in a black box, I have clearly borrowed some code from this plugin. I don't see a license, and I wanted to ask you if you were okay with me releasing the sort code with TabsExtra (mentioning you as the original source for sort portion of the code). TabsExtra is under an MIT license.
If you are really interested in the workaround I mentioned, I can take some time and port it into this.
Let me know what you think.
Enabling the auto-sort feature, it works only when opening new files using the system file opener (doing File->Open), but not when using using the Ctrl+p palette to open files (that I always use) or double clicking over a file listed into an open directory.
"Sort Tabs Menu" is greyed out in the View menu, and none of the commands are available via the Command Palette.
Any ideas?
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.