Sublime Forum

(osx|windows|linux) Color Scheme Editor (BETA)

#1

This is a color scheme editor (tmTheme file editor) for Sublime Text (only tested on ST3 so far).

The editor live edits your theme file so you can watch the colors change in your editor. To protect against unwanted changes, the theme file is copied over to a temp directory (User/ColorSchemeEditorTemp), and set as your default theme before opening in the editor. If you would like to edit the original directly (as long as it is not inside a sublime-package archive), this can be disabled, and the editor will edit the theme file directly. When it saves the tmTheme file, it will also create a tmTheme.JSON file as well.

Transparent colors are also supported, but built in color pickers on systems don’t usually have alpha support, so you have to add the alpha byte on manually via the text box. The editor will simulate how sublime will display the transparency color for you inside the editor.

  • Delete Record: press the delete
    key when selecting a row
  • Insert Record: press CMD + i
    OSX or CTRL + i Win/Linux
  • Move Setting (not for global settings): alt + up
    or alt + down
  • Edit Item: double left click
    or enter

Current Bugs

  • None

Questions:
Why are binaries so big?
Binaries are larger than you would think needed for this because these are python code compiled into binaries. They contain what they need from python so you don’t have to have python installed on your system. Binaries on some platforms will be larger than others.

Source Code for Editor:
github.com/facelessuser/ColorSc … GUI_Source
I will post instruction on how I compile it later.

I think most everything else is straight forward, so let’s get to the good stuff…

Installation

  • Install the plugin from github (binaries for editor not included): github.com/facelessuser/ColorSchemeEditor

  • Download the binary for your platform and place it on your computer (the plugin is setup to look in your User folder, but you can change that in the settings file of the plugin to look elsewhere if desired)

  • Commands are available in the command palette

Windows


Download: Windows 0.0.8

OSX


Download: OSX 0.0.8

Linux


Download: Ubuntu 12.10 32 Bit 0.0.8

0 Likes

Better Python syntax highlighting?
ST2 settings
#2

OSX added

0 Likes

#3

Looks great! Now how do I access your plugin from within ST3?

0 Likes

#4

If you added the commands to Default.sublime-commands, then you access it via the command palette. You can also create shortcuts if you prefer.

0 Likes

#5

updated bugs list on OP.

0 Likes

#6

Oh wow, I feel silly now. I thought that was a syntax screenshot and skipped over it. Thanks!

0 Likes

#7

Hi. Unfortunately is something wrong with OSX version. Plugin starting (icon appears in the dock) and quitting immediately. Tested on two different MAC’s but both with OSX 10.8.2 and ST3 3022.

0 Likes

#8

Can you give me some more info? How are you launching the program? If you click the program and try to run the program outside of Sublime Text, does it do anything differently?

0 Likes

#9

I am trying to launch app inside ST and from outside ST. Inside ST from Command Palette “Edit Color…”. There is no questions, messages, etc. icon appearing and disappearing in the dock. That’s all. Outside ST from Finder or Path Finder. App asking me for theme file. If I chose it icon in the dock disappearing and thats all. Nothing happen more.

0 Likes

#10

It sounds like when run outside of ST3, the program runs, but fails for some reason. Can you post the theme file you are trying to load when it asks you to select it? Maybe I am not handeling something proper…I need to add some kind of debugging to the app.

Also, what is the file path to the file? Maybe I am not handling some non-ascii path stuff?

When run from Sublime, do you see any errors in the console window in Sublime?

0 Likes

#11

Hi. I did some tests. I have downloaded “Monokai Blue.tmTheme” from your git and your app works fine!!! Personally I’m using customised “Solarized (Dark).tmTheme” but I see even original one is crashing app. It must be something with handling xml.

0 Likes

#12

Great! I just need to make the scheme parsing a bit more robust. I have a version 0.0.2 coming hopefully by the end of the day, I will try to resolve this issue in that.

0 Likes

#13

Solaris had some essentially empty items (no scope, colors, or font styles). The editor wasn’t prepared for the scope not being there. You can see “PHP: Class Function” has no members, but you can also see I got it working.


This will work in 0.0.2 which should drop tonight. In the future I will add a lot more checks and make sure to exit out clean if the plist is malformed.

0 Likes

#14

Great! I mean you have found where problem is :smile: I look forward for 0.0.2. Thanks!

0 Likes

#15

0.0.2 for OSX only (found some other stuff that needed work and didn’t have time to update windows)

-All events now update the theme file proper
-Fix color picker related issues
-Allow removal of a background or foreground color
-Fix issue where missing scope would cause the editor to fail
-Fix app title
-logging added
-debug mode added
-included settings file
-some internal changes

Replace all your files with the new 0.0.2

If you have the editor crash, there should be a subclrschm log file in you user folder.

I will update windows tomorrow.

0 Likes

#16

Thank you very much for this tool!! It works perfectly now!

0 Likes

#17

This is awesome! Thanks for building this.

0 Likes

#18

@n00ge @FaFiNoS, glad you like it. I had this floating in my head for a while.

0 Likes

#19

Windows version 0.0.2 is now available.

Linux is still coming along, mainly, I am trying to get my linux setup using wxgtk2.9…linux…sigh. Either that, or I need to make the editor work also with wxgtk2.8. The good news is that it half works…the bad news is that it half doesn’t. Once I get this working on Ubuntu, I have no idea if it will work on the latest Ubuntu. Oh linux…you frustrate me so. And I used linux exclusively for like 5 years; I just finally got tired of having to compile all my crap when it just wasn’t there, or to fix some new issue or driver on a simple update…it wears on you after a while. Don’t even know if the 32bit version can run on the 64bit version of linux either…

Anyways, I believe the Color Scheme Editor is 100% functional now, and relatively bug free…but report them if you find them (include the log). I do have some additional features I want to add when I have time, but for now, just let me know what you think and let me know if find issues.

0 Likes

#20

Ideas for future enhancements:

  • Run as standalone program and prompt for color-scheme file

  • Run as a package from non-User directory

This is an excellent complement to ST. Well done.
Have some confidence; skip the 0.0.x versions and jump to 1.0.0!

0 Likes