Project

General

Profile

Notepad++ » History » Version 1

iri, 09/24/2012 09:35 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
Edit the %AppData%\Notepad++\userDefineLang.xml file (create it if it does'nt exist).
9
Add it this at the end :
10
11
<pre>
12
<NotepadPlus>
13
<UserLang name='Scol' ext='pkg'>
14
<Settings>
15
<Global caseIgnored='no' />
16
<TreatAsSymbol comment='no' commentLine='no' />
17
<Prefix words1='no' words2='no' words3='no' words4='no' />
18
</Settings>
19
20
<KeywordLists>
21
<Keywords name='Delimiters'>'00'00</Keywords>
22
<Keywords name='Folder+'></Keywords>
23
<Keywords name='Folder-'></Keywords>
24
<Keywords name='Operators'></Keywords>
25
<Keywords name='Comment'>1/* 2*/ 0//</Keywords>
26
<Keywords name='Words1'>fun typeof typedef var struct proto defcom exec match with ;;</Keywords>
27
<Keywords name='Words2'>set let -> <- mutate in</Keywords>
28
<Keywords name='Words3'>if else then while do</Keywords>
29
<Keywords name='Words4'></Keywords>
30
</KeywordLists>
31
<Styles>
32
<WordsStyle name='DEFAULT' styleID='11' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
33
<WordsStyle name='FOLDEROPEN' styleID='12' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
34
<WordsStyle name='FOLDERCLOSE' styleID='13' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
35
<WordsStyle name='KEYWORD1' styleID='5' fgColor='FF0000' bgColor='FFFFFF' fontName='' fontStyle='1' />
36
<WordsStyle name='KEYWORD2' styleID='6' fgColor='800000' bgColor='FFFFFF' fontName='' fontStyle='1' />
37
<WordsStyle name='KEYWORD3' styleID='7' fgColor='0000FF' bgColor='FFFFFF' fontName='' fontStyle='0' />
38
<WordsStyle name='KEYWORD4' styleID='8' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
39
<WordsStyle name='COMMENT' styleID='1' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
40
<WordsStyle name='COMMENT LINE' styleID='2' fgColor='008000' bgColor='FFFFFF' fontName='' fontStyle='0' />
41
<WordsStyle name='NUMBER' styleID='4' fgColor='FF8040' bgColor='FFFFFF' fontName='' fontStyle='1' />
42
<WordsStyle name='OPERATOR' styleID='10' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
43
<WordsStyle name='DELIMINER1' styleID='14' fgColor='808080' bgColor='FFFFFF' fontName='' fontStyle='0' />
44
<WordsStyle name='DELIMINER2' styleID='15' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
45
<WordsStyle name='DELIMINER3' styleID='16' fgColor='000000' bgColor='FFFFFF' fontName='' fontStyle='0' />
46
</Styles>
47
</UserLang>
48
</NotepadPlus>
49
</pre>
50
51
Relaunch Notepad++ if any.
52
53
h2. The code completion
54
55
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++)
56
57
Go to Settings menu, next Preferences and choose Save / Completion tab. Configure it at your convenience. Validate and relaunch Notepad++.
58
59
h2. The FunctionList plugin
60
61
This plugin displays and sorts functions, types, constructors and variables in the side panel.
62
63
Download the plugin from "SourceForge":http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central#F
64
Copy the dll in the _Plugins_ subfolder of the installation directory. Perform a backup if any.
65
Copy all other files in %AppData%\Notepad++\Plugins\Config or in %AppInstall%\Notepad++\plugins\config\, especially _FunctionListRules.xml_
66
Edit the _FunctionListRules.xml_ file and add it these line before just the last \"\" 
67
68
<pre>
69
<Language name='Scol' imagelistpath=''>
70
<CommList param1='//' param2='' />
71
<CommList param1='/\*' param2='\*/' />
72
<Group name='FUNCTION' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
73
    <Rules regexbeg='^[ \t]*fun[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
74
</Group>
75
<Group name='TYPEOF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
76
    <Rules regexbeg='^[ \t]*typeof[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
77
</Group>
78
<Group name='VAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
79
    <Rules regexbeg='^[ \t]*var[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
80
</Group>
81
<Group name='PROTO' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
82
    <Rules regexbeg='^[ \t]*proto[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
83
</Group>
84
<Group name='STRUCT' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
85
    <Rules regexbeg='^[ \t]*struct[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
86
</Group>
87
<Group name='TYPEDEF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
88
    <Rules regexbeg='^[ \t]*typedef[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
89
</Group>
90
<Group name='DEFCOM' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
91
    <Rules regexbeg='^[ \t]*defcom[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
92
</Group>
93
<Group name='DEFCOMVAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
94
    <Rules regexbeg='^[ \t]*defcomvar[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
95
</Group>
96
</Language>
97
</pre>
98
99
If the plugin doesn't work, try to uncheck "Compacter le menu langage" présent dans le menu Paramétrages > Préférences, onglet Menu langages /Tabulations.
100
101
!http://www.irizone.net/sites/default/files/styles/large/public/field/image/app_notepad_img1.png!