Project

General

Profile

Notepad++ » History » Version 4

iri, 12/11/2013 03:56 PM

1 1 iri
h1. Notepad++
2
3
"Notepad++":http://notepad-plus.sourceforge.net/ is a free text editor on MS Windows only.
4
5
h2. Syntax highlighting
6
7
For the packages files (pkg).
8 3 iri
Edit the _%AppData%\Notepad++\userDefineLang.xml_ file (create it if it does'nt exist). By default, this file is in  @C:\Users\your_login\AppData\Roaming\Notepad++\@
9 1 iri
Add it this at the end :
10
11
<pre>
12
<NotepadPlus>
13 2 iri
    <UserLang name="Scol" ext="pkg" udlVersion="2.1">
14
        <Settings>
15
            <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
16
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
17
        </Settings>
18
        <KeywordLists>
19
            <Keywords name="Comments">03/* 04*/ 00// 01 02</Keywords>
20
            <Keywords name="Numbers, prefix1"></Keywords>
21
            <Keywords name="Numbers, prefix2"></Keywords>
22
            <Keywords name="Numbers, extras1"></Keywords>
23
            <Keywords name="Numbers, extras2"></Keywords>
24
            <Keywords name="Numbers, suffix1"></Keywords>
25
            <Keywords name="Numbers, suffix2"></Keywords>
26
            <Keywords name="Numbers, range"></Keywords>
27
            <Keywords name="Operators1"></Keywords>
28
            <Keywords name="Operators2"></Keywords>
29
            <Keywords name="Folders in code1, open"></Keywords>
30
            <Keywords name="Folders in code1, middle"></Keywords>
31
            <Keywords name="Folders in code1, close"></Keywords>
32
            <Keywords name="Folders in code2, open"></Keywords>
33
            <Keywords name="Folders in code2, middle"></Keywords>
34
            <Keywords name="Folders in code2, close"></Keywords>
35
            <Keywords name="Folders in comment, open"></Keywords>
36
            <Keywords name="Folders in comment, middle"></Keywords>
37
            <Keywords name="Folders in comment, close"></Keywords>
38
            <Keywords name="Keywords1">fun typeof typedef var struct proto defcom defcomvar ;;</Keywords>
39
            <Keywords name="Keywords2">set let -&gt; &lt;- mutate in</Keywords>
40
            <Keywords name="Keywords3">if else then while do</Keywords>
41
            <Keywords name="Keywords4"></Keywords>
42
            <Keywords name="Keywords5"></Keywords>
43
            <Keywords name="Keywords6"></Keywords>
44
            <Keywords name="Keywords7"></Keywords>
45
            <Keywords name="Keywords8"></Keywords>
46
            <Keywords name="Delimiters">00&apos; 01 02&apos; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
47
        </KeywordLists>
48
        <Styles>
49
            <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
50
            <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
51
            <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
52
            <WordsStyle name="NUMBERS" fgColor="FF8040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
53
            <WordsStyle name="KEYWORDS1" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
54
            <WordsStyle name="KEYWORDS2" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
55
            <WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
56
            <WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
57
            <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
58
            <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
59
            <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
60
            <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
61
            <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
62
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
63
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
64
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
65
            <WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
66
            <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
67
            <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
68
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
69
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
70
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
71
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
72
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
73
        </Styles>
74
    </UserLang>
75
</NotepadPlus>
76
</pre>
77
78
or, for an old NPP version :
79
80
<pre>
81
<NotepadPlus>
82 1 iri
<UserLang name='Scol' ext='pkg'>
83
<Settings>
84
<Global caseIgnored='no' />
85
<TreatAsSymbol comment='no' commentLine='no' />
86
<Prefix words1='no' words2='no' words3='no' words4='no' />
87
</Settings>
88
89
<KeywordLists>
90
<Keywords name='Delimiters'>'00'00</Keywords>
91
<Keywords name='Folder+'></Keywords>
92
<Keywords name='Folder-'></Keywords>
93
<Keywords name='Operators'></Keywords>
94
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
95
<Keywords name='Words1'>fun typeof typedef var struct proto defcom exec match with ;;</Keywords>
96
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
97
<Keywords name='Words3'>if else then while do</Keywords>
98
<Keywords name='Words4'></Keywords>
99
</KeywordLists>
100
<Styles>
101
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
102
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
103
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
104
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
105
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
106
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
107
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
108
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
109
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
110
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
111
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
112
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
113
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
114
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
115
</Styles>
116
</UserLang>
117
</NotepadPlus>
118
</pre>
119
120
Relaunch Notepad++ if any.
121
122
h2. The code completion
123
124
Download the "scol_api_notepadpp.7z":http://www.irizone.net/dl/others/notepadpp/scol_api_notepadpp.7z file and extract the content in the _plugins/api_ subdirectory of the installation folder (by default C:\Program Files\Notepad++ or C:\Programs\Notepad++)
125
126
Go to Settings menu, next Preferences and choose Save / Completion tab. Configure it at your convenience. Validate and relaunch Notepad++.
127
128
h2. The FunctionList plugin
129
130
This plugin displays and sorts functions, types, constructors and variables in the side panel.
131
132 3 iri
Download the lastest plugin named "FunctionList" from "SourceForge":http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central#F
133
In the most case, you should get the UNICODE version.
134 1 iri
Copy the dll in the _Plugins_ subfolder of the installation directory. Perform a backup if any.
135
Copy all other files in %AppData%\Notepad++\Plugins\Config or in %AppInstall%\Notepad++\plugins\config\, especially _FunctionListRules.xml_
136
Edit the _FunctionListRules.xml_ file and add it these line before just the last \"\" 
137
138
<pre>
139
<Language name='Scol' imagelistpath=''>
140
<CommList param1='//' param2='' />
141
<CommList param1='/\*' param2='\*/' />
142
<Group name='FUNCTION' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
143
    <Rules regexbeg='^[ \t]*fun[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
144
</Group>
145
<Group name='TYPEOF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
146
    <Rules regexbeg='^[ \t]*typeof[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
147
</Group>
148
<Group name='VAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
149
    <Rules regexbeg='^[ \t]*var[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
150
</Group>
151
<Group name='PROTO' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
152
    <Rules regexbeg='^[ \t]*proto[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
153
</Group>
154
<Group name='STRUCT' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
155
    <Rules regexbeg='^[ \t]*struct[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
156
</Group>
157
<Group name='TYPEDEF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
158
    <Rules regexbeg='^[ \t]*typedef[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
159
</Group>
160
<Group name='DEFCOM' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
161
    <Rules regexbeg='^[ \t]*defcom[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
162
</Group>
163
<Group name='DEFCOMVAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
164
    <Rules regexbeg='^[ \t]*defcomvar[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
165
</Group>
166
</Language>
167
</pre>
168
169 3 iri
If the plugin doesn't work, try to uncheck "Make language Menu compact" in the menu Settings > Preferences > Language Menu.
170
171 4 iri
You can edit too the file _%AppData%\Notepad++\functionList.xml (the same directory then the syntax highlighting above) to configure a parser for Scol :
172 3 iri
173
* In the *associationMap* section, add the item :
174
<pre><association userDefinedLangName="Scol" id="scol_function"/></pre>
175
176
* In the *parsers* section, add this block :
177
<pre>
178
<parser id="scol_function" displayName="Scol_source" commentExpr="((/\*.*?\*)/|(//.*?$))">
179
				<function
180
				    mainExpr="^[\t ]*fun[\s]+\w+\("
181
					displayMode="$functionName">
182
					<functionName>
183
						<nameExpr expr="(?!(if|whille))[\w_]+[\s]*\("/>
184
						<nameExpr expr="(?!(if|while))[\w_]+"/>
185
					</functionName>
186
				</function>
187
			</parser>
188
</pre>
189
190
So, you should obtain something like this :
191
192
<pre>
193
<?xml version="1.0" encoding="UTF-8" ?>
194
<!--
195
For learning making your language parser, please check the following link:
196
http://notepad-plus-plus.org/features/function-list.html
197
-->
198
<NotepadPlus>
199
	<functionList>
200
		<associationMap>
201
		<!-- langID:
202
			L_TEXT: 0     L_PHP: 1        L_C: 2        L_CPP: 3       L_CS: 4         L_OBJC: 5
203
			L_JAVA: 6     L_RC: 7         L_HTML: 8     L_XML: 9       L_MAKEFILE: 10  L_PASCAL: 11
204
			L_BATCH:12    L_INI: 13       L_ASCII: 14   L_USER: 15     L_ASP: 16       L_SQL: 17
205
			L_VB: 18      L_JS: 19        L_CSS: 20     L_PERL: 21     L_PYTHON: 22    L_LUA: 23
206
			L_TEX: 24     L_FORTRAN: 25   L_BASH: 26    L_FLASH: 27    L_NSIS: 28      L_TCL: 29
207
			L_LISP: 30    L_SCHEME: 31    L_ASM: 32     L_DIFF: 33     L_PROPS: 34     L_PS: 35
208
			L_RUBY: 36    L_SMALLTALK:37  L_VHDL: 38    L_KIX: 39      L_AU3: 40       L_CAML: 41
209
			L_ADA: 42     L_VERILOG: 43   L_MATLAB: 44  L_HASKELL: 45  L_INNO: 46      L_SEARCHRESULT: 47
210
			L_CMAKE: 48   L_YAML: 49      L_COBOL 50    L_GUI4CLI: 51  L_D: 52         L_POWERSHELL: 53
211
			L_R: 54       L_JSP: 55
212
		-->
213
			<association langID="1" id="php_function"/>
214
			<association langID="2" id="c_function"/>
215
			<association langID="3" id="c_cpp_function"/>
216
			<association langID="6" id="java"/>
217
			<association langID="9" id="xml_node"/>
218
			<association langID="12" id="batch_label"/>
219
			<association langID="13" id="ini_section"/>
220
			<association langID="19" id="js_function"/>
221
			<association langID="21" id="perl_function"/>
222
			<association langID="28" id="nsis_syntax"/>
223
			<association userDefinedLangName="Scol" id="scol_function"/>
224
		<!--
225
			if langID cannot be found above, you can still set the file extensions
226
			<association ext=".my_passer_ext1" id="my_passer_id"/>
227
			<association ext=".my_passer_ext2" id="my_passer_id"/>
228
			
229
			for User Defined Languages:
230
			<association userDefinedLangName="my user defined language" id="my_udl_passer_id"/>
231
			<association userDefinedLangName="Autocad" id="my_autocad_passer_id"/>
232
		-->
233
234
		</associationMap>
235
		<parsers>
236
237
			<parser id="xml_node" displayName="XML Node" commentExpr="&lt;!--([^-]|-(?!-&gt;))*--&gt;">
238
				<!-- Only match nodes with at least one attribute -->
239
				<function
240
				    mainExpr="&lt;[\w\?]+[\t ]+\w+[\t ]*=[\t ]*&quot;[^&quot;]+&quot;"
241
					displayMode="$functionName">
242
					<functionName>
243
						<nameExpr expr="[^&lt;]*"/>
244
					</functionName>
245
				</function>
246
			</parser>
247
248
			<parser id="batch_label" displayName="BAT Label" commentExpr="((::.*?$)|(REM.*?$))">
249
				<function
250
				    mainExpr="^[\t ]*:\w+"
251
					displayMode="$functionName">
252
					<functionName>
253
						<nameExpr expr="[^\t :]*"/>
254
					</functionName>
255
				</function>
256
			</parser>
257
258
			<parser id="ini_section" displayName="INI Section" commentExpr="((#.*?$)|(;.*?$))">
259
				<function
260
				    mainExpr="^[\t ]*[\[&quot;][\w_.; \(\)-]+[\]&quot;]"
261
					displayMode="$functionName">
262
					<functionName>
263
						<nameExpr expr="[^\[\]&quot;]*"/>
264
					</functionName>
265
				</function>
266
			</parser>
267
268
			<parser id="java" displayName="Java" commentExpr="((/\*.*?\*)/|(//.**$))">
269
				<classRange mainExpr="^[\t ]*((public|protected|private|static|final|abstract|synchronized|@(\w)+)\s+)*(class|enum|interface|@interface)\s+\w+(<\s*\w+(,\s*\w+)*\s*>)?(\s+extends\s+\w+)?(\s+implements\s+\w+(,\s*\w+)*)?\s*\{" openSymbole="\{" closeSymbole="\}">
270
					<className>
271
						<nameExpr expr="(class|enum|interface|@interface)\s+\w+(<\s*\w+(,\s*\w+)*\s*>)?"></nameExpr>
272
						<nameExpr expr="\s+\w+(<\s*\w+(,\s*\w+)*\s*>)?"></nameExpr>
273
						<nameExpr expr="\w+(<\s*\w+(,\s*\w+)*\s*>)?"></nameExpr>
274
					</className>
275
					<function mainExpr="^[\t ]*((public|protected|private|static|final|abstract|synchronized|@(\w)+)\s+)*(\w*(\[\s*])*\s+)?(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(<\s*\w+(,\s*\w+)*\s*>)?\s*\([^\)\(]*\)(\s+throws\s+\w+)?\s*\{">
276
						<functionName>
277
							<funcNameExpr expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(<\s*\w+(,\s*\w+)*\s*>)?\s*\("></funcNameExpr>
278
							<funcNameExpr expr="(?!(if|while|for|switch|catch|synchronized)\b)\w+(\[\s*])*(<\s*\w+(,\s*\w+)*\s*>)?"></funcNameExpr>
279
						</functionName>
280
					</function>
281
				</classRange>
282
			</parser>
283
284
			<parser id="c_function" displayName="C source" commentExpr="((/\*.*?\*)/|(//.*?$))">
285
				<function
286
				    mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
287
					displayMode="$functionName">
288
					<functionName>
289
						<nameExpr expr="(?!(if|while|for))[\w_~]+[\s]*\("/>
290
						<nameExpr expr="(?!(if|while|for))[\w_~]+"/>
291
					</functionName>
292
				</function>
293
			</parser>
294
			
295
			
296
			<parser id="js_function" displayName="Javascript" commentExpr="((/\*.*?\*)/|(//.*?$))">
297
				<function
298
				    mainExpr="((^|[\s]+|[;\}\.])([_A-Za-z][\w_]*\.)*[_A-Za-z][\w_]*[\s]*=|^|[\s;\}]+)[\s]*function([\s]+[_A-Za-z]?[\w_]*\([^\)\(]*\)|\([^\)\(]*\))[\n\s]*\{"
299
					displayMode="$className->$functionName">
300
					<functionName>
301
						<nameExpr expr="[_A-Za-z][\w_]*[\s]*=|[_A-Za-z]?[\w_]*[\s]*\("/>
302
						<nameExpr expr="[_A-Za-z]?[\w_]*"/>
303
					</functionName>
304
					<className>
305
						<nameExpr expr="([_A-Za-z][\w_]*\.)*[_A-Za-z][\w_]*\."/>
306
						<nameExpr expr="([_A-Za-z][\w_]*\.)*[_A-Za-z][\w_]*"/>
307
					</className>
308
				</function>
309
			</parser>
310
			
311
312
			<parser id="c_cpp_function" displayName="C++ Class" commentExpr="((/\*.*?\*)/|(//.*?$))">
313
				<classRange
314
					mainExpr="^[\t ]*(class|struct)[\t ]+[\w]+[\s]*(:[\s]*(public|protected|private)[\s]+[\w]+[\s]*)?\{"
315
					openSymbole = "\{"
316
					closeSymbole = "\}"
317
					displayMode="node">
318
					<className>
319
						<nameExpr expr="(class|struct)[\t ]+[\w]+"/>
320
						<nameExpr expr="[\t ]+[\w]+"/>
321
						<nameExpr expr="[\w]+"/>
322
					</className>
323
					<function
324
						mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{">
325
						<functionName>
326
							<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\("/>
327
							<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
328
						</functionName>
329
					</function>
330
				</classRange>
331
				<function
332
				    mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
333
					displayMode="$className->$functionName">
334
					<functionName>
335
						<nameExpr expr="(?!(if|while|for))[\w_]+[\s]*\("/>
336
						<nameExpr expr="(?!(if|while|for))[\w_]+"/>
337
					</functionName>
338
					<className>
339
						<nameExpr expr="[\w_]+(?=[\s]*::)"/>
340
					</className>
341
				</function>
342
			</parser>
343
			
344
			<parser id="nsis_syntax" displayName="NSIS Syntax" commentExpr="((/\*.*?\*)/|(#.*?$)|(;.*?$))">
345
				<function
346
				    mainExpr="^[\t ]*(!macro|Function|Section|SectionGroup)[\t ]+[^\r\n]*$"
347
					displayMode="$functionName">
348
					<functionName>
349
						<nameExpr expr="(?(?=[\t ]*!macro)[\t ]*!macro[\t ]+[^\s]+|[^\r\n]*)"/>
350
					</functionName>
351
				</function>
352
			</parser>
353
			
354
			<parser id="perl_function" displayName="Perl">
355
				<function mainExpr="sub[\s]+[\w]+[\s]*\([^\)\(]*\)[\n\s]*\{" displayMode="$className->$functionName">
356
					<functionName>
357
						<nameExpr expr="(sub[\s]+)?\K[\w]+"/>
358
					</functionName>
359
					<className>
360
						<nameExpr expr="[\w]+(?=[\s]*::)"/>
361
					</className>
362
				</function>
363
			</parser>
364
			
365
			<parser id="php_function" displayName="PHP" commentExpr="((/\*.*?\*)/|(//.*?$))">
366
				<classRange
367
					mainExpr="^[\t ]*(class|struct|abstract[\t ]+class)[\t ]+[\w]+([\s]*|[\s\t]*(extends|implement)[\t ]+[\w]+[\s]*)?\{"
368
					openSymbole = "\{"
369
					closeSymbole = "\}"
370
					displayMode="node">
371
					<className>
372
						<nameExpr expr="(class|struct|abstract[\t ]+class)[\t ]+[\w]+"/>
373
						<nameExpr expr="[\t ]+[\w]+\Z"/>
374
						<nameExpr expr="[\w]+\Z"/>
375
					</className>
376
					<function
377
						mainExpr="^[\t ]*((static|public|protected|abstract|private|private[\s]+static|public[\s]+static|protected[\s]+static)[\s]+)?(function[\s]+)+([\w]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\{]*\{">
378
						<functionName>
379
							<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\([^\{]*"/>
380
							<!-- comment below node if want display method with parmas -->
381
							<funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
382
						</functionName>
383
					</function>
384
				</classRange>
385
				<function
386
				    mainExpr="^[\t ]*function[\s]+\w+\("
387
					
388
					displayMode="$className->$functionName">
389
					<functionName>
390
						<nameExpr expr="(?!(if|while|for))[\w_]+[\s]*\("/>
391
						<nameExpr expr="(?!(if|while|for))[\w_]+"/>
392
					</functionName>
393
					<className>
394
						<nameExpr expr="[\w_]+(?=[\s]*::)"/>
395
					</className>
396
				</function>
397
			</parser>
398
			
399
			<parser id="scol_function" displayName="Scol_source" commentExpr="((/\*.*?\*)/|(//.*?$))">
400
				<function
401
				    mainExpr="^[\t ]*fun[\s]+\w+\("
402
					displayMode="$functionName">
403
					<functionName>
404
						<nameExpr expr="(?!(if|whille))[\w_]+[\s]*\("/>
405
						<nameExpr expr="(?!(if|while))[\w_]+"/>
406
					</functionName>
407
				</function>
408
			</parser>
409
			
410
		</parsers>
411
	</functionList>
412
</NotepadPlus>
413
</pre>
414
415
Save an relaunch NPP.
416
Note : NPP can be slower with the FunctionList plugin.
417 1 iri
418
!http://www.irizone.net/sites/default/files/styles/large/public/field/image/app_notepad_img1.png!