It is currently June 24th, 2021, 10:27 pm

Sublime Text 2 Rainmeter package

Plugins and Addons popular with the Community
poiru
Developer
Posts: 2866
Joined: April 17th, 2009, 12:18 pm

Re: [WIP] Sublime Text 2 Rainmeter package

Post by poiru »

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.
Spaces are allowed, but definitely discouraged (so I'd suggest you don't highlight them).
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: [WIP] Sublime Text 2 Rainmeter package

Post by thatsIch »

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.

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.
http://rainmeter.net/cms/Skins-Variables

there is nothing mentioned there
and it does work, else I wouldnt use it ^^

€: ok nvm.. look ^
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

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.
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.
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.
poiru wrote: Spaces are allowed, but definitely discouraged (so I'd suggest you don't highlight them).
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.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
Alex Becherer

Re: [WIP] Sublime Text 2 Rainmeter package

Post by Alex Becherer »

MerlinTheRed wrote:What do you mean by toolbar?
Untitled-1.jpg
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: [WIP] Sublime Text 2 Rainmeter package

Post by thatsIch »

if you write numbers with 6/8 digits
you get the RGB Code

User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

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:

Code: Select all

type: Image and hit enter. See what happens:

[$1]
Meter=Image
ImageName=$2
X=$3
Y=$4
W=$5
H=$6
Then you can use tab to cycle through the $number things and enter your values
thatsIch wrote:if you write numbers with 6/8 digits
you get the RGB Code

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.
What do you think? Is activating a config if it's not activated yet a good idea or is it undesirable? Of course refreshing a skin that is not loaded doesn't make sense.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [WIP] Sublime Text 2 Rainmeter package

Post by KreAch3R »

Thanks for the quick reply. I'm going to try it soon. As for the 'load' subject, I am in favor of it. :)
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: [WIP] Sublime Text 2 Rainmeter package

Post by UnforgivenRevival »

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.

Capture.PNG
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.
User avatar
UnforgivenRevival
Posts: 310
Joined: June 7th, 2012, 2:25 am
Location: Philadelphia, PA

Re: [WIP] Sublime Text 2 Rainmeter package

Post by UnforgivenRevival »

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.

Capture.PNG
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. :handtohead: Will take a look at this one instead.



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
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [WIP] Sublime Text 2 Rainmeter package

Post by KreAch3R »

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.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image