Sublime Forum

How to implement a plugin with UI?

#1

We can control view, window, but how to implement a plugin with user interface?

0 Likes

#2

Sublime Text 2 doesn’t have an API for it, unless you want a text-based UI. (see bitbucket.org/guillermooo/packa … at=default for an example of a text-based UI).

0 Likes

#3

You could create a binary with a gui that ST2 could talk to. I have thought about that for a few things…just don’t have the time right now.

I have thought it would be cool to do a theme editor this way. Create a gui in python and bundle it as an executable (that bundles everything it needs inside the executable, no need to require a certain version of python) with something like pyinstaller. Send the path to your current open theme in ST2 to the executable . The executable would have a gui for selecting colors etc. and creating new rules. The gui would update the actual theme file giving you a nice local gui editor to change colors, and you could see the changes live in ST2.

So it is possible (but very involved), it just depends what you want to do.

0 Likes

#4

[quote=“facelessuser”]You could create a binary with a gui that ST2 could talk to. I have thought about that for a few things…just don’t have the time right now.

I have thought it would be cool to do a theme editor this way. Create a gui in python and bundle it as an executable (that bundles everything it needs inside the executable, no need to require a certain version of python) with something like pyinstaller. Send the path to your current open theme in ST2 to the executable . The executable would have a gui for selecting colors etc. and creating new rules. The gui would update the actual theme file giving you a nice local gui editor to change colors, and you could see the changes live in ST2.

So it is possible (but very involved), it just depends what you want to do.[/quote]

Yeah , it’s a cool idea. What about let ST2 talk with a web server? I mean run a web server on local machine, then ST2 plugin use urllib to connect it , Use browser to display UI. :laughing:

0 Likes

#5

Hi

I`ve made a post asking about it, but could it be possible to run sublime in a QT window/widget??, I mean if it’s anyway to get sublime window and embedde it into PYQT, PYQT4…

any idea??

Thanks :smile:

0 Likes