Home Download Buy Blog Forum Support

SublimeJSONColorSchemeEditor - GUI edit syntax colors

SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby robertcollier4 on Wed Mar 27, 2013 4:29 pm

This tool will let you use a GUI to visually see, edit, and add name/scope definitions to your color scheme files. It is written in AutoIt3 - but there is a compiled EXE if you don't have AutoIt3.

The only caveat is that this tool only reads JSON format files. It was too tedious for me to figure out how to read the Plist format with AutoIt3 - whereas there was a ready made function library for JSON which this tool uses to read and write. So you must first convert your color scheme into JSON via PlistJsonConverter Plugin or AAAPackageDev Plugin and then open that JSON file with this tool.

Download: SublimeJSONColorSchemeEditor.zip - includes compiled EXE and also source .au3 files if you would like to run/edit with AutoIt3.

Update: Please re-download to update to v1.08 - bug fixes, major speed improvements, and window can now be resized.

Image
Last edited by robertcollier4 on Mon Jun 10, 2013 6:52 am, edited 21 times in total.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Wed Mar 27, 2013 6:03 pm

I have considered doing something like this for a while, but never had the time. It would be nice to pair this with commands that auto open it for you etc. I will have to try it out. Thanks.
facelessuser
 
Posts: 1574
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby robertcollier4 on Wed Mar 27, 2013 7:04 pm

@facelessuser - let me know of anything I can do to help with integration with your PlistJsonConverter Plugin. You are welcome to bundle this with your plugin. I wrote this tool because I felt there was a barrier to people being motivated to develop good syntax highlighting color schemes due to the complexity of working with XML files and then visualizing the result. Hopefully with the right tools - the Sublime ecosystem can have richer syntax coloring color schemes.

Also, I have updated the program to now auto-load a file passed to it from a command line argument, accept drag and dropped filenames into the filename field, as well as fixed a bug with the global theme color boxes updating.

Also, for some reason the ListView becomes a bit slow sometimes when adding or updating many rows. (UPDATE: fixed in v1.05)
Last edited by robertcollier4 on Fri Mar 29, 2013 12:38 pm, edited 1 time in total.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Wed Mar 27, 2013 10:25 pm

I kind of like this. My only real problem is that it is Windows only. What my plan has always been, was to code a GUI up in Python and use PyInstaller to generate binaries for Windows, Mac, and (I think it can do linux). The plus side of this is that I can support it all in one code base, and since it is Python, I can embed the JsonToPlist logic directly in it (it could generate the plist and the json from either file). I imagine the final implementation would simply be to call the executable with the file name of either json or plist and then when you save in the editor, it would dump the json and plist. Since it is always writing the plist out, you could watch the colors update in the editor.
facelessuser
 
Posts: 1574
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Thu Mar 28, 2013 6:57 am

Slowly working on a cross platform python version:
Screen Shot 2013-03-28 at 12.28.53 AM.png
Screen Shot 2013-03-28 at 12.28.53 AM.png (80.65 KiB) Viewed 4454 times
facelessuser
 
Posts: 1574
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby tito on Thu Mar 28, 2013 7:55 am

uhh no, use html5 instead.. :roll:
Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 855
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby Fed03 on Thu Mar 28, 2013 12:53 pm

really cool everyone^^^
Fed03
 
Posts: 79
Joined: Sun Oct 16, 2011 6:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby facelessuser on Thu Mar 28, 2013 1:16 pm

tito wrote:uhh no, use html5 instead.. :roll:
If all major browsers supported everything I needed in HTML5 besides just Chrome, then I would consider it. Maybe things have changed recently...I don't know. People who do HTML coding all of the time also like to suggest things like this, there is nothing wrong with it, but when you are a hammer, everything looks like a nail. Maybe I'm the hammer here maybe not, but I don't really care right now.

I see it in my profession all of the time, even when it would make more sense to use something else...people like to use what they know. I know people that swear by Pearl even though I think its awful (I still use it when I have to). Also, I don't think it matters, if the result is the same, what does it matter what language I use?

HTML5 is a perfectly valid solution, and something I may consider when the major browsers support what I need. I do have code I can work off for that if I do that as well.
facelessuser
 
Posts: 1574
Joined: Tue Apr 05, 2011 7:38 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby robertcollier4 on Thu Mar 28, 2013 11:05 pm

facelessuser wrote:Slowly working on a cross platform python version:

Looking nice already. Making GUIs in python is something I haven't done but am interested in learning. Which GUI library are you using? The default tkinter or something like wxpython? Also, what do you think about something like this? ObjectListView:
http://www.blog.pythonlibrary.org/2009/ ... -listctrl/

After playing with editing themes in a GUI, here are a couple things that I think would be nice:
1. Allow sorting via the scope column.
2. Allow loading of a .tmLanguage file which would show which color scheme scope each language definition matches up to - this would also allow a user to easily see if certain langauge rules that they have currently defined might be going unused with their current color scheme. This would help .tmLanguage creators to define scope rules that best work with a variety of 3rd-party color schemes.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: SublimeJSONColorSchemeEditor - GUI edit syntax colors

Postby robertcollier4 on Fri Mar 29, 2013 12:51 pm

Bump. Original Post download link updated to v1.05 - major speed improvements when updating row items.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests