It is currently December 14th, 2018, 8:24 pm

RainLexer 2.1.1 (syntax highlighter for Notepad++)

Share your custom plugins and applications to enhance Rainmeter.
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

RainLexer 2.1.1 (syntax highlighter for Notepad++)

poiru » December 21st, 2010, 9:51 pm

RainLexer

Note that Notepad++ version 7.6 or later is required!

RainLexer is a plugin for Notepad++ 7.6 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

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.1.1

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
You do not have the required permissions to view the files attached to this post.
User avatar
JpsCrazy
Posts: 690
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: RainLexer (syntax higlighting for Notepad++)

JpsCrazy » December 21st, 2010, 10:17 pm

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.
glpelletier
Posts: 1
Joined: December 19th, 2010, 8:06 pm
Location: Kansas City

Re: RainLexer (syntax higlighting for Notepad++)

glpelletier » December 22nd, 2010, 2:12 am

I agree with the folding, you should add it. Can't wait until you put up the download link.
Today is the future's past
dragonmage
Developer
Posts: 1296
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: RainLexer (syntax higlighting for Notepad++)

dragonmage » December 22nd, 2010, 4:16 am

Do you mean the +/- next to each section name?
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

Re: RainLexer (syntax higlighting for Notepad++)

poiru » December 22nd, 2010, 4:23 am

dragonmage wrote:Do you mean the +/- next to each section name?
Yep.
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

RainLexer 0.9.0

poiru » December 22nd, 2010, 11:01 am

Updated first post with download, check it out..
dragonmage
Developer
Posts: 1296
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

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

dragonmage » December 22nd, 2010, 11:24 am

Why not? It doesn't hurt anything.
User avatar
maminscris
Posts: 522
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

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

maminscris » December 22nd, 2010, 11:26 am

thanks :beer: :beer1:
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

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

poiru » December 22nd, 2010, 11:27 am

dragonmage wrote:Why not? It doesn't hurt anything.
It's included in 0.9.0 :)
User avatar
jsmorley
Developer
Posts: 18494
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

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

jsmorley » December 22nd, 2010, 1:12 pm

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.