It is currently April 28th, 2024, 2:28 pm

Sublime Text 2 Rainmeter package

Plugins and Addons popular with the Community
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

New version for download here: https://github.com/merlinthered/sublime-rainmeter/downloads

Modified the snippets a bit. While working with them I noticed that it's a little annoying if you frequently have to delete some lines. e.g. the image snippet contained options for images dependent on a measure and images with hard coded image paths. You always had to delete the options for one of them. It wasn't a lot of work because when cycling through the fields of the snippet with tab, the whole line would be highlighted first, so you only had to press backspace once.

Nevertheless it's not very practical. Therefore I changed some of the snippets so they only contain the absolutely required options for the most common use of the meter or measure. If you notice something that needs to be changed in one of the snippets for them to be useful, please tell me.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: Sublime Text 2 Rainmeter package

Post by thatsIch »

I'm not entirely sure if you have already explained it, but how to use the snippets and for what purpose?
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

Snippets are like code templates. I have added some for all the measures and meters. Most of their names begin with a "t". If you want to add the template for a RoundLine meter, type troun... the autocomplete should show you the option to choose "troundline Roundline Meter" . Hit enter. Now the code template is inserted into your code. Press tab and shift-tab to cycle back and forth through the available fields you can fill in.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Sublime Text 2 Rainmeter package

Post by Kaelri »

If anyone wants it, I've written a new color scheme to match the Nexus theme for ST2.

I tried to make the colors loosely analogous to the ones used for Lua highlighting (though they're really based on frequency rather than meaning). The only thing I changed from Nexus is the orange comment color, mainly because I hate it.
Screenshot19.png
Nexus (Rainmeter).zip
Merlin, I have one suggestion: I think the @include key should have a separate color class. It works differently from other section keys, and it would helpful if included files were easier to spot, since they can have such a significant impact on the skin code.
You do not have the required permissions to view the files attached to this post.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

I like the color scheme. You could send me a pull request in github so I can integrate it. I wanna try that feature.

The thing with the @include is a good idea. Perhaps we could make it bold? I don't want to add a completely separate color for this.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Sublime Text 2 Rainmeter package

Post by Kaelri »

MerlinTheRed wrote:I like the color scheme. You could send me a pull request in github so I can integrate it. I wanna try that feature.
Already did. :)
MerlinTheRed wrote:The thing with the @include is a good idea. Perhaps we could make it bold? I don't want to add a completely separate color for this.
Sure, whatever you want. It seems to be easy enough to customize per-scheme.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

Alright. Updated the language definition to now have storage.type.option.predefined.include.rainmeter. The color schemes highlight it with bold italic. I think it stands out enough that way.

I wonder If I should use the existing color definitions that most themes have defined rather than setting my own... Wouldn't be as semantically nice but applying color schemes would be far easier.

EDIT: Is it on purpose that builtin options (like FontFace, ImageName, X, Y, etc.) are normal while non-builtin options are italic?
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Sublime Text 2 Rainmeter package

Post by Kaelri »

MerlinTheRed wrote:I wonder If I should use the existing color definitions that most themes have defined rather than setting my own... Wouldn't be as semantically nice but applying color schemes would be far easier.
That seems wise, if Rainmeter's functions can be mapped to general functions easily. I think we'll still need a few Rainmeter-specific classes, though.
MerlinTheRed wrote:Is it on purpose that builtin options (like FontFace, ImageName, X, Y, etc.) are normal while non-builtin options are italic?
Yes. It seemed a little cleaner than using a different color. That's just my personal preference, of course.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

My instinct would suggest that italic is somehow more special than non-italic, meaning that those italic options are special. Perhaps you could argue that they are, because they are used less often than built-in options. I would have switched it, making the built-ins italic, but I guess so many italic stuff would be distracting.

Blah blah I'm blubbering away. Just ignore me...
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Sublime Text 2 Rainmeter package

Post by Kaelri »

My instinct was to make non-standard keys italic because they are less frequent. In other words, yes, they're "special," and to me, the italics say "pay attention to these keys, because they're different from the others."

Please don't hesitate to ignore my suggestions, though. :)

I'm also looking at the standard classes and trying to see which ones we can merge. I'll post later with my findings.