sublime-rainmeter
This package for Sublime Text 2 makes developing Rainmeter skins even more fun.
Visit the project website for more information, instructions and downloads.
Features
Syntax Highlighting
Syntax highlighting is turned on by default for files with the .ini and .inc extensions. There are several color schemes you can choose from.
Code Completion
Code completion is activated by default. While typing, it will suggest completions from a list of options, values, builtin variables and more. When auto-completing a bang, the required and optional (in braces) parameters are also added, and you can cycle through them by pressing tab or shift+tab.
Additionally, code snippets for common usages of each meter and measure type, and all native plugins are included. The names of those snippets start with a "t" for template, so if you want to insert a basic template for a string meter, type tstring and hit enter, if you want to insert a metadata block, type tmetadata. There is also a snippet with a basic structure of a skin file called tskin.
You can see all available snippets by looking in the Snippets folder in the Rainmeter package directory. If you feel that one of those snippets needs to be changed in order to be more useful, don't hesitate to contact me.
Tools
Code Folding
Sublime Text 2 supports folding indented code sections. Hitting ctrl+alt+i automatically indents a Rainmeter source file so code folding is possible in a sensible way. All options in a section are indented and can be folded away. Additionally, inserting a comment line starting with a double semicolon: ;; will indent everything after it so it can be folded until the next ;; that you indented by the same amount. This is useful if you want to fold a specific section of code, like all measures or meters. If you want to add a nice looking header for your foldable sections, try typing divider and hitting enter.
Color Picker
Ever wanted to quickly adjust the color of a meter but found yourself unable to imagine what a rgb color will look like in your head? No more! I have adapted the awesome Color Picker Plugin created by weslly to work with rainmeter-style hex-color definitions. Place your mouse cursor in a hexadecimal color definition, or select it and hit ctrl+shift+c. This will open a color picker dialog and let you choose a color. If your cursor is currently not in a color definition, the hex code will be inserted at the cursor position. You can't adjust the alpha value, but it will be preserved after you chose the new color.
New Skin
The Rainmeter section in the Tools menu contains a handy command for creating a new skin. It will open a new buffer, insert a basic skin skeleton and change the syntax highlighting mode to Rainmeter. The same skeleton is also available as a snippet called tskin.
Refresh Skin/Rainmeter
The package includes a custom "build system" for Rainmeter, which lets you refresh the current skin with a single button press. Press f7 or ctrl+b to refresh the current skin, or load it, if it's not currently active. Pressing ctrl+shift+b will refresh Rainmeter and all skins instead. Those commands are also available from the tools menu via Build and Run.
For more information, instructions and downloads, visit the project page: http://merlinthered.github.com/sublime-rainmeter/
It is currently April 19th, 2024, 11:54 am
Sublime Text 2 Rainmeter package
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Sublime Text 2 Rainmeter package
Last edited by MerlinTheRed on August 28th, 2012, 3:09 pm, edited 7 times in total.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: [WIP] Sublime Text 2 Rainmeter package
Testing and messing with it to see if I can break anything. Will let you know tomorrow what I find out.
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: [WIP] Sublime Text 2 Rainmeter package
I already found some issues. Will upload a fix later.
One thing I'm wondering: Should I highlight valid values for certain options only if they are used directly with that option, or also anywhere else? I'm talking about things like ImageFlip=Horizontal. RainLexer only highlights this if it's used like that, not if it's used for example in a variable which is used to switch the value. Of course if it's used in a variable it could also be a normal string. Very confusing.
Also I currently have no checking if a certain combination of option=value is valid. I need to figure out how to do this right.
One thing I'm wondering: Should I highlight valid values for certain options only if they are used directly with that option, or also anywhere else? I'm talking about things like ImageFlip=Horizontal. RainLexer only highlights this if it's used like that, not if it's used for example in a variable which is used to switch the value. Of course if it's used in a variable it could also be a normal string. Very confusing.
Also I currently have no checking if a certain combination of option=value is valid. I need to figure out how to do this right.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 446
- Joined: August 7th, 2012, 9:18 pm
Re: [WIP] Sublime Text 2 Rainmeter package
Testing it too
Already searched for a better environment
€: my incs doesnt highlight
€€: nvm I could switch it up,
was just a lil confusiing cause the text was cut off
Already searched for a better environment
€: my incs doesnt highlight
€€: nvm I could switch it up,
was just a lil confusiing cause the text was cut off
Last edited by thatsIch on August 12th, 2012, 10:49 am, edited 2 times in total.
Powered by Sublime Text 3 with Rainmeter-Package
Re: [WIP] Sublime Text 2 Rainmeter package
the color highlighting is a cool idea!
i probably would get annoyed by the red, green and blue, but a subtle difference for the alpha part is something i would appreciate.
may i ask three questions before i decide wether i'll give this a try:
does it have folding?
does it have split view?
does it load fast (as fast as notepad.exe)?
i probably would get annoyed by the red, green and blue, but a subtle difference for the alpha part is something i would appreciate.
may i ask three questions before i decide wether i'll give this a try:
does it have folding?
does it have split view?
does it load fast (as fast as notepad.exe)?
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: [WIP] Sublime Text 2 Rainmeter package
loads pretty fast, has split view. Folding only works if you indent all options under a section. I think there is no way I can specify a folding behavior depending on custom syntax.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 446
- Joined: August 7th, 2012, 9:18 pm
Re: [WIP] Sublime Text 2 Rainmeter package
FoldingAlex Becherer wrote:the color highlighting is a cool idea!
i probably would get annoyed by the red, green and blue, but a subtle difference for the alpha part is something i would appreciate.
may i ask three questions before i decide wether i'll give this a try:
does it have folding?
does it have split view?
does it load fast (as fast as notepad.exe)?
Split View with 4 max
Speed: I tried counting to one, but failed. Its definitly faster than notepad++. Its different speed than notepad. I loads as fast but content is loaded after, but you wont see a noticable difference imho.
If he develops this software further the 59 bucks are well invested
love the CTRL + D function
€: I have an Issue with variable names using space
Powered by Sublime Text 3 with Rainmeter-Package
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: [WIP] Sublime Text 2 Rainmeter package
As far as I know variables names aren't allowed to have spaces in them? At least it is my feeling that they shouldn't.
I've uploaded a new version of the colors and syntax definition. It now includes checking for some common option values (like legal values for StringAlign etc.). The colors are a bit different now, but I'm still experimenting.
I've uploaded a new version of the colors and syntax definition. It now includes checking for some common option values (like legal values for StringAlign etc.). The colors are a bit different now, but I'm still experimenting.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: [WIP] Sublime Text 2 Rainmeter package
Awesome job Merlin, if you have the time, check if we can set 'Refresh skin' in the context menu. I will try your work soon.
Re: [WIP] Sublime Text 2 Rainmeter package
just had a look at it. pretty cool software.
it does not have a toolbar though? i use those buttons quite often. :/
it does not have a toolbar though? i use those buttons quite often. :/