Notepad++ Function List

Scripting and setups with Notepad++ and AutoHotkey.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Notepad++ Function List

15 Sep 2018, 21:22

I know there is already a function list available, but it's buggy and over-the-top. This one supports just functions and classes, giving just the names (not parameters or extended classes), and properly ignores comments (at least for what I've tested).

As noted as a bug on the other thread, the closing bracket of a class can not be the last character in the file for the list to propagate. There needs to be a space or line, something, anything after it. Limitation of their parsing, it seems. Doesn't apply to functions, just classes.

Code: Select all

            <association userDefinedLangName="AutoHotkey" id="ahk"/>

Code: Select all

           <parser id="ahk" displayName="AutoHotkey" commentExpr="((/\*.*?\*/)|(;.*?$))">
                <classRange
                   mainExpr="^(/\*|\})?[\t ]*(class)[\t ]+[$\w]+[\t ]*(extends[\t ]+[$\w]+[\s]*)?\{"
                   openSymbole = "\{"
                   closeSymbole = "\}"
                   displayMode="node">
                    <className>
                        <nameExpr expr="class[\t ]+\K[$\w]+"/>
                    </className>
                    <function
                       mainExpr="^(/\*|\})?[\t ]*(?!(if|while|loop))[$\w]+\s*\([^\r\n]*?\)[^.\r\n]*?\s*?\{">
                        <functionName>
                            <funcNameExpr expr="(?!(if|while|loop))[$\w]+"/>
                        </functionName>
                    </function>
                </classRange>
                <function
                   mainExpr="^(/\*|\})?[\t ]*(?!(if|while|loop))[$\w]+\s*\([^\r\n]*?\)[^.\r\n]*?\s*?\{"
                   displayMode="$className->$functionName">
                    <functionName>
                        <nameExpr expr="(?!(if|while|loop))[$\w]+"/>
                    </functionName>
                    <className>
                    </className>
                </function>
            </parser>
Updated: fixed some inconsistencies
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
rediffusion
Posts: 58
Joined: 15 Mar 2019, 05:16

Re: Notepad++ Function List

15 Dec 2019, 12:11

@Masonjar13

How do you use it can you tell the manual? :silent: :think:
Also here's some interesting topic about the `Functions`. And «NotePad++» has building feature, check it - View > Function List
User avatar
TheArkive
Posts: 1027
Joined: 05 Aug 2016, 08:06
Location: The Construct
Contact:

Re: Notepad++ Function List

11 Feb 2020, 01:23

@Masonjar13
Very nice man. Works like a charm.

Return to “Notepad++”

Who is online

Users browsing this forum: No registered users and 3 guests