It is currently April 19th, 2024, 12:54 am

Sublime Text 2 Rainmeter package

Plugins and Addons popular with the Community
Alex Becherer

Re: [WIP] Sublime Text 2 Rainmeter package

Post by Alex Becherer »

Untitled-1.jpg
did you know this thing is skinnable?
https://github.com/buymeasoda/soda-theme/


now i only have to find a way to add a toolbar, convert Merlin's colors to zenburn and (maybe) create a more Windows-ish skin.
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 »

jsmorley wrote: View / Document Map
Nice! :)
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: [WIP] Sublime Text 2 Rainmeter package

Post by thatsIch »

another missing feature would be toggling the comments imho =)
though until now (nonstop coding in lua, ini, inc) no problems or issues found.

Is there a common way to write down things like

Code: Select all

Meter = String
?
Some people write it
Meter=STRING
Meter = STRING
Meter = String
Meter = string
Meter=string
etc...
I know if you use !WriteKeyValue its saved as

Code: Select all

KEY =VALUE
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 »

There is a shorcut command, "ctrl+\" I think (or "/"), that you can change. From a little testing though I didn't find a way to mark multiple lines and comment them out with a shortcut though, only from the menu bar.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by Kaelri »

KreAch3R wrote:There is a shorcut command, "ctrl+\" I think (or "/"), that you can change. From a little testing though I didn't find a way to mark multiple lines and comment them out with a shortcut though, only from the menu bar.
If you select text on multiple lines and hit Ctrl+/, it will comment out all of those lines. I believe N++ works the same way (but with Ctrl+K).
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [WIP] Sublime Text 2 Rainmeter package

Post by jsmorley »

Kaelri wrote: If you select text on multiple lines and hit Ctrl+/, it will comment out all of those lines. I believe N++ works the same way (but with Ctrl+K).
In Notepad++ you can use CTRL-Q to "toggle" comments in highlighted blocks.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

Mordasius wrote:Nice work Merlin :thumbup:
Anyway, I use the Solarized (Dark) colour scheme with .lua files so I changed parts of your rainmeter colour set to be closer to that. One thing I couldn't work out was how to change the colour of the '=' sign. I'd like it to be something other than white so that the following number or name stands out. I would also like to make opening and closing brackets sets ( ... ) or [ ... ] turn red when you hover-over them (as in Notepad++). The best I could do was get the underline to turn red ( the same applies to .lua files with the Solarized (Dark) colour scheme).
The equal signs are not yet included as a special part of the syntax. I don't know If I want to highlight them. If I do, they will probably highlighted the same as other "mathematical" operators like +-*/ etc. The brackets are also not currently a special part of my syntax definition. There might be a way to set how they are highlighted when the cursor is near them from sublime itself (or in the color definition). I haven't figured it out yet though.
Mordasius wrote: I'm glad you included a way to refresh the current config from the editor as that is something I use a lot in Notepad++. I did however have to change "D:\\Programme\\Rainmeter\\Rainmeter.exe" to "C:\\Program Files\\Rainmeter\\Rainmeter.exe" in Rainmeter.sublime-build to make it work on my system. I also had to delete the "!ActivateConfig" part of the command to get Ctrl+B to refresh the current config. Trying to activate and refresh a config that was already running just gave me an error. Why would you need to refresh a file that you'd just activated anyway?
The activate command is in there for redundancy so the skin is refreshed or activated if it's not already activated yet. It only gives a Rainmeter Warning message for me, not an error. The hardcoded path is not something I want to keep this way (that's why I didn't announce that the builds are already working). The ideal way would be if you could somehow determine Rainmeter's executable path from a windows environment variable or registry value or something. I didn't find any of those that could help me though. Perhaps someone knows more?
thatsIch wrote:Good Job on the Refresh Command
Saves so much time,
love it! =)

One thing I found

= 22,22,22,22,222222

is tolerated but it should end with RGBA
can you tell it, theres nothing coming after?
I can require that it has to end with the end of the line. Not sure though if this is really the only case where it is ever used. Can this kind of color definition be used in other places, where there are other things around to the left and right?
thatsIch wrote:another missing feature would be toggling the comments imho =)
though until now (nonstop coding in lua, ini, inc) no problems or issues found.

Is there a common way to write down things like

Code: Select all

Meter = String
?
Some people write it
I know if you use !WriteKeyValue its saved as

Code: Select all

KEY =VALUE
I consider Meter=String the most beautiful case ;). That's why I use "proper" case on almost all strings in the snippets and autocompletion. I guess it's a matter of taste, as the Ini format is case insensitive in almost all cases.

I do want to change the autocomplete behavior a little:

Remove all the "Meter=xxxxx", "Measure=xxxxxx" etc. completions and replace them with single words for "Meter", "Measure", etc. and all the measure names. I think that it is a little less obtrusive.

Change the snippets' triggers so they aren't the same as the meter/measure types. That way there is less risk you accidentally trigger a snippet if you really just wanted to complete the type name.

What do you think?

Oh, there's one more thing: https://github.com/weslly/ColorPicker#readme
I started to adapt this so it works for rainmeter (works with additional alpha value in the color string, no # inserted before the hex code if there was none before). It does only work for the hex color version yet, but for that it works pretty well. I don't know if I will add functionality to support the comma separated color type, as it's too ambiguous.
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: [WIP] Sublime Text 2 Rainmeter package

Post by thatsIch »

KreAch3R wrote:There is a shorcut command, "ctrl+\" I think (or "/"), that you can change. From a little testing though I didn't find a way to mark multiple lines and comment them out with a shortcut though, only from the menu bar.
change where?
cause per default its not working for me.. maybe just blind :3

@Merlin
I think there is no case in normal ini file besides you do BANGs
like
[!SetOption myMeter FontColor FFFFFF]

mh pretty ugh, I think its better to tolerate the xx,xx,xx,xx,xxxxxxxx
to loose the normal highlight

but its not possible to actually try to render the color of the number there?
I mean.. o nvm sometimes it would be pretty hard to read the colors I guess

@autocompletion: yea was kinda annoying

@color: its a nice to have, but it wouldnt be a high priority for me
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

I just found out that you can enclose any option value (to the right of a Key= line) with quotes. Even if it's a keyword like Horizontal or Image. I'll have to look into this for the correctness-checking to work.

Rendering the color in it's actual color value might be possible but I don't think it's a good idea. Also It would require me to write complex python code, which is something I don't want to do right now.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

Mordasius wrote:Still haven't worked out how to synchronise vertical scrolling in Sublime Text 2.
Maybe this is interesting for you? https://github.com/SublimeText/BufferScroll#readme
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!