Page 1 of 32

RainLexer 2.20.0 (syntax highlighter for Notepad++)

Posted: December 21st, 2010, 9:51 pm
by poiru
RainLexer

RainLexer is a plugin for Notepad++ v8.3 or greater that allows proper syntax highlighting for Rainmeter .ini and .inc files.

It adds color coding for Rainmeter specific syntax when editing files, as well as a way to refresh Rainmeter or the skin you are working on within Notepad++. It does not provide auto-complete or other Rainmeter specific functionality.
15.jpg
14.jpg
The first shot is taken using the default Notepad++ theme, whereas the second is taken with the Zenburn theme active. The installer supports both of these themes. If you're using some other theme, you'll have to adjust the colors to fit.

Install Notepad++

If you have not yet installed Notepad++, the first step is to do that.

Notepad++ can be downloaded and installed from Notepad++ Download

You can use either the 32bit or 64bit version of Notepad++.

Install Notepad++ and open it at least once to initialize it. Then close it to install Rainlexer.

↡↡↡ Download RainLexer ↡↡↡

The latest version of RainLexer is at: RainLexer 2.21.0

Download this file, but hang on one second before you install it.

Decide on a theme

Before you install RainLexer, you should decide if you prefer the "Default" or "Zenburn" themes in the images above. If you prefer the default Notepad++ theme, then you can skip the next steps.

Installing RainLexer with Zenburn theme

In order to have the installer for RainLexer detect that you want to use the Zenburn theme and install that version of the color scheme for Rainmeter .ini/.inc files, you should first set Zenburn as the theme in Notepad++ before you run the RainLexer installer.

In Notepad++, change the theme to Zenburn in the "Style Configurator".
04.jpg
05.jpg
06.jpg
Then exit Notepad++ and simply install RainLexer, selecting the "Reset style settings" option in the dialog.
08.jpg
I changed my mind!

To change between the Zenburn or default themes later, simply change the theme in Notepad++ using the "Select theme:" pull-down at the top of the "Style Configurator", save that choice, exit Notepad++, and run the RainLexer installer again, selecting that "Reset style settings" option in the dialog.

Changing the colors

If you want to customize the colors used in Rainmeter (either theme, Default or Zenburn) you can use the "Style Configurator", select the Rainmeter element you want to change in the list, and click on the color square to bring up a color picker dialog.
12.jpg
Updating RainLexer

As features and functions are added in Rainmeter, color coding for new keywords and values will be added to RainLexer. To update RainLexer, simply download the latest version, and install it.

Note: If you have changed any of the colors for Rainmeter using the "Style Configurator" as described above, be sure that the "Reset style settings" option in the dialog is not selected when you install the latest RainLexer. That will preserve your changes while updating the functionality.
09.jpg

Re: RainLexer (syntax higlighting for Notepad++)

Posted: December 21st, 2010, 10:17 pm
by JpsCrazy
I believe the collapsing sections would be useful,
In case you're fixing a problem on a skin and you know certain meters/measures are correct but some are not.

I don't use Notepad++ enough to know if this already exists/if it's possible, but possibly like a 'bookmark' of where your are.
Say you're looking at a top of the skin, and there's something relevant to that at the end you can switch to that exact spot and then back to where you where with a click or something.

Re: RainLexer (syntax higlighting for Notepad++)

Posted: December 22nd, 2010, 2:12 am
by glpelletier
I agree with the folding, you should add it. Can't wait until you put up the download link.

Re: RainLexer (syntax higlighting for Notepad++)

Posted: December 22nd, 2010, 4:16 am
by dragonmage
Do you mean the +/- next to each section name?

Re: RainLexer (syntax higlighting for Notepad++)

Posted: December 22nd, 2010, 4:23 am
by poiru
dragonmage wrote:Do you mean the +/- next to each section name?
Yep.

RainLexer 0.9.0

Posted: December 22nd, 2010, 11:01 am
by poiru
Updated first post with download, check it out..

Re: RainLexer 0.9.0 (syntax highlighter for Notepad++)

Posted: December 22nd, 2010, 11:24 am
by dragonmage
Why not? It doesn't hurt anything.

Re: RainLexer 0.9.0 (syntax highlighter for Notepad++)

Posted: December 22nd, 2010, 11:26 am
by maminscris
thanks :beer: :beer1:

Re: RainLexer 0.9.0 (syntax highlighter for Notepad++)

Posted: December 22nd, 2010, 11:27 am
by poiru
dragonmage wrote:Why not? It doesn't hurt anything.
It's included in 0.9.0 :)

Re: RainLexer 0.9.0 (syntax highlighter for Notepad++)

Posted: December 22nd, 2010, 1:12 pm
by jsmorley
Very nice indeed. Great job.

Couple of things just based on a very quick look:

1) Missing "ScriptFile=" (I missed it too in my latest UserDefineLang)

2) I gather you are not going to highlight the "value" part of Key=Value when there are defined options?

Meter=Image
Measure=Calc
StringStyle=Bold

I'd miss that... I make as many mistakes with improper values as I do with improper keys.

I'll look at it further when I get back from the holiday, but I'm impressed. I have looked at the whole lexer thing, and know how much effort this was... Wow.