Home Download Buy Blog Forum Support

(ST3) TabsExtra

(ST3) TabsExtra

Postby facelessuser on Wed Feb 12, 2014 8:44 pm

Sublime Plugin with sticky tabs and more tab closing options.

Image

By default, the commands won't be grouped together as seen in the picture because of the way Sublime Text menus are managed. But you can optionally install a menu that overrides the Default Package's tab context menu for sane grouping of the commands.

Also, by default TabsExtra keeps the current active tab focused, but if the active tab gets closed, TabsExtra will default to either the next left or right tab (depending how the user has it set). This is configurable.

See repo for more info.

Repo https://github.com/facelessuser/TabsExtra
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: (ST3) TabsExtra

Postby iamntz on Thu Feb 13, 2014 10:55 pm

Awesome plugin!
Here is an idea: add options to close all saved tabs, all saved tabs to the left, all saved tabs to the right.

I often have many unsaved tabs (you know, ctrl+n to do short notes) and is killing me that i cannot close other tabs in one move.
iamntz
 
Posts: 918
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: (ST3) TabsExtra

Postby facelessuser on Fri Feb 14, 2014 12:47 am

@iamntz Thanks!

That is a interesting idea. Hadn't thought about that. I will look into it. You should post a github issue so I don't forget.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: (ST3) TabsExtra

Postby facelessuser on Fri Feb 14, 2014 1:05 am

I was just thinking, instead of adding a bunch of redundant commands, why not a "sticky all unsaved" command?
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: (ST3) TabsExtra

Postby iamntz on Fri Feb 14, 2014 8:59 am

Because i like my little chaos i have here :D

Actually sticky all tabs would do...
iamntz
 
Posts: 918
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: (ST3) TabsExtra

Postby facelessuser on Fri Feb 14, 2014 5:28 pm

Cool. The change will be pretty easy. I just need to workout a menu updating system when the format of the menu changes. I wasn't planning on needing to update the menu...should of planned for updating the menu :).

Will probably just open a message view in the editor alerting the user they need to select an "Update Default Menu" command or the "Install Override Menu" when the format changes. That is probably easiest. That way I don't have to bother with validating whether the the menu default menu has been overridden, or they are just using the default TabsExtra menu in the User folder.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: (ST3) TabsExtra

Postby tito on Fri Feb 14, 2014 11:14 pm

Neat, This may looks useful for this package:
{ "command": "reopen_last_file","caption": "Undo Close Tab" },

Also, reveal (open in explorer), locate (show it on sidebar) and revert seems to be some other good suggestions.
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 876
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: (ST3) TabsExtra

Postby facelessuser on Sat Feb 15, 2014 12:38 am

Undo is a good idea. At least for tab(s) that exist on disk ;).

Reveal and show in sidebar might be nice too. Do you think they are too redundant since they are already available in the view already? I really am kind of in the middle on this. I guess it could be optional.

Thanks for the suggestion.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: (ST3) TabsExtra

Postby tito on Sat Feb 15, 2014 1:58 am

IMO (person who likes ontology :P), I believe ..
The Tab context menu should be for operations related to the tabbar, and the current file.
The View Context Menu should be for operations about the content of the editor/buffer, not about the file. !

JFYI My tab context menu has been like this from some time https://dl.dropboxusercontent.com/u/930 ... t-menu.png
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 876
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: (ST3) TabsExtra

Postby facelessuser on Sat Feb 15, 2014 3:48 pm

tito wrote:IMO (person who likes ontology :P), I believe ..
The Tab context menu should be for operations related to the tabbar, and the current file.
The View Context Menu should be for operations about the content of the editor/buffer, not about the file. !

JFYI My tab context menu has been like this from some time https://dl.dropboxusercontent.com/u/930 ... t-menu.png

This makes sense from author of the sidebar menu plugin :).

I like your menu setup. And I agree with your view on menus. I may borrow from your menu setup some.

The one thing I wish ST allowed that may be difficult for me to solve from a usability aspect, is that ST doesn't allow augmentation of the menu via modifiers. One thing I would love to add is something like where you press a modifier, and the "close tabs" options change. Like hold ctrl, and now the close tabs options will close saved tabs without a warning dialog. Or hold alt, and the options now will close all tabs but saved tabs.

I was thinking about iamntz's request, and ideally that is how I would like to approach it, but I can't. I was thinking that a sticky all unsaved was fine, but now I want to implement close commands that will discard unsaved files automatically without that "Do you want to save?" dialog. I realized I would need yet another toggle...toggles for sticky tabs is fine, but toggling for all variants of a command would get tiresome. I am now thinking the best approach is just to use sub-menus. Though you have to navigate a level deeper, you won't have to open the menu twice: one to toggle and one to execute. And burying the variants in a sub-menu will keep the top level from getting cluttered with multiple variants of the same command.
Code: Select all
Close Tab
Close All
Close Others
Close to Left
Close to Right
----------------
Close Saved Tabs... ->
                                 Tab
                                 All
                                 Others
                                 To Left
                                 To Right
-----------------
Close Tabs (Discard Unsaved) ->
                                               Tab
                                               All
                                               Others
                                               To Left
                                               To Right
-----------------


I am open to suggestions. Anyone care to weigh in?
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests