It is currently June 19th, 2021, 6:33 pm

Sublime Text 2 Rainmeter package

Plugins and Addons popular with the Community
User avatar
Mordasius
Posts: 1056
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: [WIP] Sublime Text 2 Rainmeter package

Post by Mordasius »

MerlinTheRed wrote:Maybe this is interesting for you? https://github.com/SublimeText/BufferScroll#readme
Thanks for that Merlin..

I use vertical scrolling once in a while when updating Rainmeter.ini files but find it indispensable when playing around with the config files for games like STALKER, Morrowind, Fallout, etc. I've become a bit of a Notepad++ aficionado but still resort to WinMerge when I need to compare two text files to see what has been changed.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

https://github.com/spape/SublimeFileDiffs#readme
https://github.com/SublimeText/WinMerge#readme

One of those might interest you. Basically they just start WinMerge or any other external diff tool with the two last active files/buffers when you hit ctrl+alt+d. Not much, but if you use Sublime for all your text editing stuff and then want to compare two files, this might come in handy to speed things up just a little bit.

Now I'll stop posting unrelated stuff ;)

Related stuff: I've started to implement a kind of code folding support for Rainmeter ini files. Code folding in Sublime still only works by indentation, but I've written a plugin that lets you automatically indent a complete Rainmeter file by pressing ctrl+alt+i so that code folding is possible in a sensible way. To make visual impact minimal, I've also set the default indentation width to one space. You can easily change that though. One feature I added is a special comment construct: ";;" that lets you define your own custom foldable regions. Basically everything between one comment line that starts with multiple semicolons and the next can be folded (after running the auto-indent plugin).
You do not have the required permissions to view the files attached to this post.
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 »

nice

but now again: where do I change that ini and inc files get toggled to comment?
If I use the menu entry

Edit > Comment > Toggle Comment

or press the shortcut it doesnt work.
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

Í haven't uploaded the necessary files to enable comment toggling in Rainmeter files yet. They are included in this new version:


New version of the Rainmeter package for Sublime Text 2:
Put those files into C:\Users\You\AppData\Roaming\Sublime Text 2\Packages\Rainmeter\
Delete all Rainmeter-related files in your User directory first (unless you want them to override my version)


From now on you can have my package in the "Rainmeter" Package folder and store any custom settings related to it in your User folder.

New features:
  • Build system: Press F7 or Ctrl+B to update the current skin. (Will be loaded if not already active). Press Ctrl+Shift+B to refresh Rainmeter completely. If your Rainmeter is not installed in C:\Program Files\Rainmeter, copy the Rainmeter.sublime-build file to your User directory and change the path to the executable there.
  • Code folding: Hit Ctrl+Alt+i and watch the magic
  • Comment toggling: Hit Ctrl+/ to toggle comments on the currently selected lines
  • Autocomplete: Tweaked autocompletion to hopefully behave a little more comfortably.
  • Snippets: prefixed all snippet triggers with a "t" for template so they don't get in the way when you just want to complete "Meter=Stri".
ToDo:
  • Make the indent command available from the Menu
  • Figure out a way to automatically determine the Rainmeter path
  • Add snippets for plugins
  • Add snippets for bangs (something like: !SetOption [Meter/Measure] [Option] "[Value]" (Config) where you can cycle through the parameters with tab and see which ones are required for each bang)
  • Make the Color Picker available (have to check licensing stuff etc. since I just tweaked it a little)
You do not have the required permissions to view the files attached to this post.
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 »

Thanks for the new version =)
Getting really addicted :D

but I'm getting an Error following your instruction
I copied all into the new rainmeter folder in the %appdata%
cause my rainmeter isnt in default I copied it to my user and modified the file editing the path
to D://RainMeter (or D:\\RainMeter too lazy to look :D)

and I'm getting this


€: for now I just copied it to my user-folder but my guess is its not intended :P

€€: YES COMMENT TOGGLING YOU ARE A GOD :D
before I had to select > "Tab" > replace "Tab" with ";" lol :D
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

This might be because Sublime remembers that you had your Rainmeter language definition in another place before. Try deleting the Rainmeter.tmLanguage from your User directory (or put it back into the Rainmeter folder), then close all tabs that contain any Rainmeter files and restart Sublime. Hopefully it will then reload the language definition from the correct place when you open a new ini file.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!
User avatar
jsmorley
Developer
Posts: 21776
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [WIP] Sublime Text 2 Rainmeter package

Post by jsmorley »

MerlinTheRed wrote:This might be because Sublime remembers that you had your Rainmeter language definition in another place before. Try deleting the Rainmeter.tmLanguage from your User directory (or put it back into the Rainmeter folder), then close all tabs that contain any Rainmeter files and restart Sublime. Hopefully it will then reload the language definition from the correct place when you open a new ini file.
I think it creates some .cache files that would be worth deleting as well to be sure they are not getting in the mix.
User avatar
thatsIch
Posts: 446
Joined: August 7th, 2012, 9:18 pm

Re: [WIP] Sublime Text 2 Rainmeter package

Post by thatsIch »

MerlinTheRed wrote:This might be because Sublime remembers that you had your Rainmeter language definition in another place before. Try deleting the Rainmeter.tmLanguage from your User directory (or put it back into the Rainmeter folder), then close all tabs that contain any Rainmeter files and restart Sublime. Hopefully it will then reload the language definition from the correct place when you open a new ini file.
nope didnt help

just to be sure

I set the color scheme to rainmeter
and the syntax to rainmeter

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

Re: [WIP] Sublime Text 2 Rainmeter package

Post by MerlinTheRed »

This works for me if that error pops up:

1. Close all tabs with rainmeter code individually.
2. Close Sublime text
3. Open Sublime Text
4. Load a Rainmeter ini file

I just tried it by deleting the Rainmeter.tmLanguage and ...cache from the Rainmeter package directory and copying it to the User directory, then performing the above steps. Then I moved it back to the Rainmeter directory, and again the above steps worked. Make sure the Rainmeter directory is the only one you have that tmLanguage file in, although it shouldn't make a difference (unless one of them is corrupted).
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 »

MerlinTheRed wrote:This works for me if that error pops up:

1. Close all tabs with rainmeter code individually.
2. Close Sublime text
3. Open Sublime Text
4. Load a Rainmeter ini file

I just tried it by deleting the Rainmeter.tmLanguage and ...cache from the Rainmeter package directory and copying it to the User directory, then performing the above steps. Then I moved it back to the Rainmeter directory, and again the above steps worked. Make sure the Rainmeter directory is the only one you have that tmLanguage file in, although it shouldn't make a difference (unless one of them is corrupted).
Thanks that worked for me =)

€: tested new version:
good new auto-complete