Spaces are allowed, but definitely discouraged (so I'd suggest you don't highlight them).MerlinTheRed wrote: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.
It is currently December 7th, 2023, 7:39 am
Sublime Text 2 Rainmeter package
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: [WIP] Sublime Text 2 Rainmeter package
-
- Posts: 446
- Joined: August 7th, 2012, 9:18 pm
Re: [WIP] Sublime Text 2 Rainmeter package
http://rainmeter.net/cms/Skins-VariablesMerlinTheRed wrote: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.
there is nothing mentioned there
and it does work, else I wouldnt use it ^^
€: ok nvm.. look ^
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
What do you mean by toolbar? The menu bar with File, Edit, Preferences etc? I cut that out in my screenshots because I thought it wasn't important. Sublime has a pretty powerful set of keyboard shortcuts, too. Try selecting a portion of text that is repeated several times in your document, then hit ctrl+D multiple times and start typing.
We can define a custom "Build System" for Rainmeter. Without a bigger effort we can only add two different commands, "Build" and "Run". These can execute whatever we want. I have set mine up to refresh the current config when selecting "Build" and to refresh all configs when selecting "Run". "Build" is accessible by pressing F7 or ctrl+B by default, "Run" can be started by ctrl+shift+B. You can also select this from the "Tools" menu. Unfortunately the names are not customizable.KreAch3R wrote: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.
Yeah, somehow I like the idea of an educational syntax highlighting. Hence the highlighted deprecated features. If it's supposed to adhere to the standard, I'd have to tolerate everything that's possible, though. But I guess since I'm doing this in my spare time I can choose to highlight code that is written how it's supposed to be written :P If there's a huge outcry I might change it.poiru wrote: Spaces are allowed, but definitely discouraged (so I'd suggest you don't highlight them).
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
Re: [WIP] Sublime Text 2 Rainmeter package
MerlinTheRed wrote:What do you mean by toolbar?
-
- Posts: 446
- Joined: August 7th, 2012, 9:18 pm
-
- Rainmeter Sage
- Posts: 889
- Joined: September 6th, 2011, 6:34 am
Re: [WIP] Sublime Text 2 Rainmeter package
No, it seems there is no such thing. The only thing on there I don't use shortcuts for is "open" and "new". The advantages are far greater though. How about typing "Image", hitting enter and seeing it transform to this:
Then you can use tab to cycle through the $number things and enter your values
EDIT: About Refresh Commands:
We have two commands we can execute via shortcuts (without creating new menu entries, which don't have key bindings by default). Currently I have these two actions bound to them:
Code: Select all
type: Image and hit enter. See what happens:
[$1]
Meter=Image
ImageName=$2
X=$3
Y=$4
W=$5
H=$6
Yeah, I'm aware of that. It's one of the tradeoffs I'd like to have feedback on. Do you like the color highlighting enough to overlook that it is sometimes applied in the wrong places? Or should I go with the more general case and don't highlight what can't be determined without ambiguity?
EDIT: About Refresh Commands:
We have two commands we can execute via shortcuts (without creating new menu entries, which don't have key bindings by default). Currently I have these two actions bound to them:
- Refresh the current Skin. If it's not activated yet, load the Skin.
- Refresh the whole Rainmeter application.
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
Thanks for the quick reply. I'm going to try it soon. As for the 'load' subject, I am in favor of it. 

-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: [WIP] Sublime Text 2 Rainmeter package
Wow I missed alot of progress while sleeping. Everything looks good so far. One question though, Will the color codes with 12 numbers, "255,255,255,255", do the same as the 6/8 digit color coding? I tend to use this more often.
the auto-complete option for meters and measures seems like a real useful, almost lazy, feature that would help new people out alot. It would be really handy instead of writing the same thing over and over and over and.. you get my point.
One thing I did notice, is some of the "faded red" names show up more pink than they should. I'm not sure if you have it set up that way or not but Ill include an image showing you what I mean.
Seems that the name, version and license is the same color as the rest of the terms in measures and meters, but config, description, instructions, tags, etc show up pink. It does this with other terms throughout an .ini. esp in .lua measures and metadata.
the auto-complete option for meters and measures seems like a real useful, almost lazy, feature that would help new people out alot. It would be really handy instead of writing the same thing over and over and over and.. you get my point.
One thing I did notice, is some of the "faded red" names show up more pink than they should. I'm not sure if you have it set up that way or not but Ill include an image showing you what I mean.
Seems that the name, version and license is the same color as the rest of the terms in measures and meters, but config, description, instructions, tags, etc show up pink. It does this with other terms throughout an .ini. esp in .lua measures and metadata.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: [WIP] Sublime Text 2 Rainmeter package
UnforgivenRevival wrote:Wow I missed alot of progress while sleeping. Everything looks good so far. One question though, Will the color codes with 12 numbers, "255,255,255,255", do the same as the 6/8 digit color coding? I tend to use this more often.
the auto-complete option for meters and measures seems like a real useful, almost lazy, feature that would help new people out alot. It would be really handy instead of writing the same thing over and over and over and.. you get my point.
One thing I did notice, is some of the "faded red" names show up more pink than they should. I'm not sure if you have it set up that way or not but Ill include an image showing you what I mean.
Seems that the name, version and license is the same color as the rest of the terms in measures and meters, but config, description, instructions, tags, etc show up pink. It does this with other terms throughout an .ini. esp in .lua measures and metadata.
Whoops, I did not notice you uploaded a new fileset.

Edit: The blue names that were once faded red, still do the same thing. some are more blue than others.
One other thing, I noticed that plugins will only turn yellow as long as they dont have .dll after them. I think they should still highlight yellow even with the .dll
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: [WIP] Sublime Text 2 Rainmeter package
Judging from the screenshot above, I would say that the faded colors are used for the deprecated keys. And I think Merlin has already posted that, too.