It is currently September 20th, 2020, 9:10 pm

Notepad++: Display Rainmeter Sections List

Share and get help with Plugins and Addons
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Notepad++: Display Rainmeter Sections List

Post by eclectic-tech »

I wanted to resurrect and highlight this great tool addition to Notepad++ by mr. derek... Thanks!

This will display all of your skin sections in a sidebar for quick access; a great addition for editing larger skins!

Originally posted Mar 29, 2015 :: Link to original post
mr.derek wrote:Hi!

Thanks so much for this syntax highlighter, I love it!

I just thought I'd contribute my findings - I use the function list in Notepad++ to navigate quickly around a big ini file, but couldn't figure out how to get it to work with a language that was installed as a plugin (such as Rainlexer). The following worked for me:

Go to your windows user's appdata: WIN + R - %APPDATA%\notepad++

Open up functionsList.xml and go to the associations section (pictured). Be sure to make a backup of this file before you save any changes.



Now this next part will depend on how many languages you have installed. I only had one (Autohotkey). The system languages as documented in the XML file go up to id 55. So with AHK at id 56, Rainmeter took up id 57. The function parser for my purposes was the same as an ini file where [...] defines the function. So the association statement you enter is:

<association langID="57" id="ini_section"/>

You may need to adjust the langID number higher or lower depending on your setup. Worst case start with 56 and increment up by 1 until the functions list starts working for rainmeter files.



Finally, I use a black background in notepad++ for everything so I'm attaching my styler data which works for the Vibrant Ink theme (or any other black background theme). As Rainlexer is a plugin you have to go to %AppData%\Notepad++\plugins\config\RainLexer.xml

Open it up and at the bottom you will see LexerStyles. Make a backup of this file and then replace the following style with the one there for a black background style (all dem zeros).

Code: Select all

    <LexerStyles>
        <LexerType name="Rainmeter" desc="Rainmeter" ext="" excluded="no">
            <WordsStyle name="DEFAULT" styleID="0" fgColor="ECF0F1" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT" styleID="1" fgColor="2ECC71" bgColor="000000" fontName="" fontStyle="3" fontSize="" />
            <WordsStyle name="SECTION" styleID="2" fgColor="64B0E3" bgColor="000000" fontName="" fontStyle="1" fontSize="" />
            <WordsStyle name="OPTION" styleID="3" fgColor="F39C12" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="0" />
            <WordsStyle name="EQUALS" styleID="4" fgColor="AB66D0" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="1">if else for while</WordsStyle>
            <WordsStyle name="INVALID VALUE" styleID="5" fgColor="D81E0A" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="2">if else for while</WordsStyle>
            <WordsStyle name="VALUE" styleID="6" fgColor="DD59DD" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="3">bool long int char</WordsStyle>
            <WordsStyle name="BANG" styleID="7" fgColor="F7573C" bgColor="000000" fontName="" fontStyle="0" fontSize="" keywordClass="4" />
            <WordsStyle name="VARIABLE" styleID="8" fgColor="F1C40F" bgColor="000000" fontName="" fontStyle="1" fontSize="" keywordClass="5" />
            <WordsStyle name="USER VARIABLE" styleID="9" fgColor="F1C40F" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
        </LexerType>
    </LexerStyles>
Thanks again for the plugin and for the work in maintaining it! I'm still very new to Rainmeter so please correct me if I'm wrong in anything.
User avatar
Active Colors
Moderator
Posts: 612
Joined: February 16th, 2012, 3:32 am

Re: Notepad++: Display Rainmeter Sections List

Post by Active Colors »

Somehow I missed original post. Thank you that you resurrected this and huge thanks to mr. derek. Now I can easily navigate through my big skins with 25000+ meters.
RiseUp
Posts: 6
Joined: November 3rd, 2017, 8:08 pm

Re: Notepad++: Display Rainmeter Sections List

Post by RiseUp »

eclectic-tech wrote:Information on Setting Rainmeter Association to show [Sections] after Updating Notepad++

I recently updated Notepad++ to v7.5.1 and lost my FunctionList association for Rainmeter file [Sections].
This is to be expected because languages are added to Notepad++ and the langID will change for ones added by end users.

Normally, this would be a simple matter of:
  • opening "AppData\Roaming\Notepad++\functionlist.xml"
  • increasing the langID one number at a time
  • closing and re-opening Notepad++
  • then opening a Rainmeter skin to test if the sections appear.
My advice is "Don't get discouraged" if you have to increase that number quite a bit to get the association working again...
I had to increase the langID by almost 30 numbers before it worked; originally it was 58 ... now it is 85 :jawdrop

Depending on how often you update Notepad++, just be aware that quite a few languages may have been added to it's library.

The association number for the Rainmeter language may need to increased significantly to get sections to show in the functionlist. :great:
The above quote is from this thread.

Has anyone else gotten this working? I didn't even know about the Function List feature of Notepad++ unti I came across eclectic-tech's post. It sounded great, so I gave it a shot.

I've been increasing my langID and have gotten up to 90 so far with no result yet. :???: I'd love to hear from anyone else on Notepad++ v7.5.1 who successfully got this working.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Display Rainmeter Sections List

Post by eclectic-tech »

RiseUp wrote:The above quote is from this thread.

Has anyone else gotten this working? I didn't even know about the Function List feature of Notepad++ unti I came across eclectic-tech's post. It sounded great, so I gave it a shot.

I've been increasing my langID and have gotten up to 90 so far with no result yet. :???: I'd love to hear from anyone else on Notepad++ v7.5.1 who successfully got this working.
As I posted, I have it working with Notepad++ V7.5.1 by editing "AppData\Roaming\Notepad++\functionlist.xml". Make sure you are editing the one in "AppData\Roaming" and NOT the functionList.xml in "Program Files (x86)\Notepad++". The settings in your AppData file overrides any settings in the one included in Program Files.

Starting at id=56 and increasing it by one. After saving the file, you have to close Notepad++. Open it and open a skin to see if the functionList.xml is displaying sections in the sidebar Function List.
np++functionlist.png
It took me 30 changes to get it working. Here is my edited functionList.xml association section...
np++functionList2.png
Hope this gets it working for you too! :great:
You do not have the required permissions to view the files attached to this post.
RiseUp
Posts: 6
Joined: November 3rd, 2017, 8:08 pm

Re: Notepad++: Display Rainmeter Sections List

Post by RiseUp »

eclectic-tech wrote:...Hope this gets it working for you too! :great:
When I tried this method earlier today, I made sure to edit the correct copy of that file—the one in AppData\Roaming.

I did finally get it work, though! :) The reason it didn't work then is that the AppData version of the functionList.xml file did not have the ini_section parser. I innocently :? assumed that because the parser was already in the Program Files version that it would still work as Notepad++ would essentially merge the two copies. Well, I was wrong.

For anyone else reading this with the same problem I had, ensure that you have the ini_section parser in that same functionList.xml to which you are adding or editing the association tag. :D

Thank you very much for helping me out with this, eclectic-tech! :great:
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4112
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Notepad++: Display Rainmeter Sections List

Post by eclectic-tech »

Thanks for that additional info. Glad to hear you got it working! :thumbup: