Hello everyone!
Please Configure your Notepad++ as jNizM's great thread teaches. After you can add this feature too
https://autohotkey.com/boards/viewtopic.php?f=7&t=50
Nightwolf86/85 has added classes too!
Those who use Notepad++ and love it as your main text editor, I create a simple function list tracking.
Function List is a useful resource to track your functions in a big script. This resource is built-in in newer notepad++ versions. So you just need to activate and use it!
In order to Function List work, you need to do some simple settings before you use it. First, make a backup copy of functionList.xml or rename it, if something goes wrong you restore it.
Now, Follow the steps below:
1. Open the xml file called functionList.xml with an editor;
This file is in installation folder if you only extracted notepad++. If you installed notepad using the installer, it is most likely that this file is in appdata notepad++ folder, which you can reach typing %appData% in windows explorer path.
2. In <associationMap> field add these lines:
Code: Select all
<association ext=".ahk" id="ahk_function"/>
<association userDefinedLangName="Name" id="ahk_function"/>
Language menu. This is, in most cases, a user defined Language.
3. In <parsers> field add another parser as below. Last modified by Nightwolf85 in June 2017:
Code: Select all
<parser id="ahk_function" displayName="AHK" commentExpr="((/\*.*?\*)/|((?<=[\s]);.*?$))">
<!-- AutoHotKey Function List -->
<classRange
mainExpr="^[ \t]*(class|struct)[ \t]+[\w]+([ \t]+|[ \t]+(extends)[ \t]+)?\w*([\s]|(/\*.*?\*)/|((?<=[\s]);[^\r\n]*?$))*?[\s]*\{"
openSymbole = "\{"
closeSymbole = "\}"
displayMode="node">
<className>
<nameExpr expr="(class|struct)[\s]+[\w]+"/>
<nameExpr expr="[\s]+[\w]+"/>
<nameExpr expr="[\w]+"/>
</className>
<function
mainExpr="^[ \t]*(?!(if\(|while\(|for\())([\w#!^+&<>*~$])+\d*(\([^)]*\)|\[[^]]*\])([\s]|(/\*.*?\*)/|((?<=[\s]);[^\r\n]*?$))*?[\s]*\{|^[ \t]*(?!(if\(|while\(|for\())([\w#!^+&<>*~$])+\d*:(?=([\s]*[\r\n]|[\s]+;.*[\r\n]))|^[ \t]*(?!(;|if\(|while\(|for\())([^\r\n\t])+\d*(?<![\s])::">
<functionName>
<funcNameExpr expr="([\w#!^+&<>*~$])+\d*(\([^)]*\)|\[[^]]*\])|([\w#!^+&<>*~$])+\d*:(?!:)|(?![ ])([^\r\n\t])+\d*::"/>
</functionName>
</function>
</classRange>
<function
mainExpr="^[ \t]*(?!(if\(|while\(|for\())([\w#!^+&<>*~$])+\d*\([^)]*\)([\s]|(/\*.*?\*)/|((?<=[\s]);[^\r\n]*?$))*?[\s]*\{|^[ \t]*(?!(if\(|while\(|for\())([\w#!^+&<>*~$])+\d*:(?=([\s]*[\r\n]|[\s]+;.*[\r\n]))|^[ \t]*(?!(;|if\(|while\(|for\())([^\r\n\t])+\d*(?<![\s])::"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="([\w#!^+&<>*~$])+\d*\([^)]*\)|([\w#!^+&<>*~$])+\d*:(?!:)|(?![ ])([^\r\n\t])+\d*::"/>
</functionName>
</function>
</parser>
If you have any question and concerns please leave a message.
I hope you like it!