-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored themes into simple build #59
base: master
Are you sure you want to change the base?
Conversation
Neat, so the |
Yepper! :D
Sure! Gimme a few… |
This is the file extension used by the majority of GitHub
Alright! Updated the main README, added one under |
Good idea. I wonder if something slightly more platform independent like perl or python might be better than a bash script? Also, I guess ideally the light and dark themes should be the same with the base colours swapped. If that is the case, perhaps you could build both from one set of source files? |
well textmate 1/2 only runs on recent-ish OSX so anything which will run I don't believe the sublime fork takes any changes from us anymore, so as On Friday, 11 April 2014, Jørgen Ibsen [email protected] wrote:
Tom Martin |
Textmate is OS X only, which always has bash, so…
Probably! It occurred to me, but I wanted to see whether this PR would be well-received before I spent more time refactoring. How bout it, @deplorableword ? |
Ah, I didn't realize Textmate was OS X only, good point. |
Finally got it! Just swap the 4 base values (by toggling the presence/absence of a leading zero).
The comments were there to label the hex values. Now, the variable names are self-describing.
Okay! I just updated, and now there are no more Anyone else want to try it out and let me know how it goes? |
Neat, I will give this a spin As an aside, one of the reasons why developing this is so tedious is the constant need to re-load the theme into TextMate. At the end of the build we could trigger something to re-load TextMate the latest current theme? AppleScript perhaps? Might not be possible or simple, but would improve the workflow for sure. |
Oh, I’ve been thinking about this a lot. I don’t know anything for certain yet…but I do have an idea. TextMate bundles are incredibly powerful and flexible. If you open the Bundle editor ( Theoretically, it should be possible to:
Until then, I’m still doing things manually. Although there is one keyboard shortcut that automatically restarts TextMate: So, if you’re testing the Solarized build, you can drop the themes in using the Finder, then go back to TextMate and hit the keyboard shortcut. It quits, then automatically restarts. |
Yeah I guess we could write a bundle so you could hit a key inside TextMate to build then restart, getting a bit meta :) I don't have a copy of TM1 to hand, but I think there used to be a Theme Development bundle which actually re-loaded the theme? Not sure if this did a full restart. Possible that the command doesn't exist in TM2 anymore anyway. If we are using the command line to do a build, then could we add something like |
I posted about this in braver/Solarized#16, but since it relates to this pull request as well, I made an example branch off your work to show how this theme could also be generated using yamltotm: https://github.com/jibsen/textmate-solarized/tree/yamltotm_build Your script already does most of this of course, the only added benefit is that YAML is easier to work with than XML. |
Motivation
I wanted to add some more colors for ReST, and I got annoyed that I had to hunt to find the single existing rule for ReST within a large file.
I also noticed that the rules for Markdown were not all together; they were split up into two different parts of the theme.
We can do better!
Changes
src/
__«VARIABLE»__
build.sh
script that concatenates the files for each language together, then replaces all the variables with their Solarized color valuesBenefits
__RED__
, and you’ll get Solarized red.tmTheme
file (no more “Markdown rules … other rules … more Markdown rules”)