Sublime Forum

New plugin idea


I am a long time webdev, experienced in serveral lanuages, and long time sublime fan. I usually have ~20 files opened, this makes my tab bar pretty crazy. Ive been looking for a way to tame this down. I checked out some of the available solutions, and none really fit my needs, or havent come across one anyways. I thought to myself, I am a programmer, albeit different languages, but I can and am willing to learn.
My idea is to have the tabs dragable and sortable, more importantly, divided into multiple rows. My thinking is to create a wrapper, look through all the tabs, then style with some basic css.
Here is my code to far…

import sublime
import sublime_plugin
import os
import tab
import sys
class advancedTabs():
def run(self, edit):
	window = sublime.active_window()
	views = window.views()

	advancedTabs = '<div id="tabWrapper">'
	for view in views:
		advancedTabs += make_tab(os.path.abspath(view.file_name()), view.file_name())
	advancedTabs += '</div>'

def make_tab(path, name):
	individualTab = '<div class="tab">'
		individualTab += '<a href="'+path+'">'+name+'</a>'
		individualTab = '<div class="tabClose">X</div>'
	individualTab += '</div>'
	return individualTab

Specifically I’m curious about how I might target, and write to a specific UI region(namely the tab bar). Does python accept html/css? How do I concatinate a string? Any pointers on sublime plugin developement would be awesome.



Regarding pointers on Sublime Text plugin development, I have a [](http://video series on YouTube) that covers it.

However, with that said, if your intention is to augment the user interface of Sublime in some fashion, that’s not possible (except via themes, which can do things like change the colors and images used to represent thing).

The UI in Sublime is controlled purely by the core (that is, unlike say VSC which is just a web application packaged into it’s own electron wrapper application, Sublime is a native app and isn’t modifiable in that manner).



@Inkt @OdatNurd, I saw this yesterday. Would it be possible to recreate it in Sublime Text?



Visualized like that? Most likely not; it would need to be constrained by Sublime’s existing UI and reimagined around that. In all likelyhood that would revolve around just having a list of files that you’ve recently edited that you can jump to, which is already possible via Sublime using Goto Anything, or a package could track what’s being opened and closed and put them in a list.

I don’t know if the idea has any merit if it’s not going to visually show you file contents and flip through them like a timeline, though.