Project

General

Profile

Notepad++ » History » Version 2

iri, 12/11/2013 03:23 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 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
Download the plugin from "SourceForge":http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Plugin_Central#F
133
Copy the dll in the _Plugins_ subfolder of the installation directory. Perform a backup if any.
134
Copy all other files in %AppData%\Notepad++\Plugins\Config or in %AppInstall%\Notepad++\plugins\config\, especially _FunctionListRules.xml_
135
Edit the _FunctionListRules.xml_ file and add it these line before just the last \"\" 
136
137
<pre>
138
<Language name='Scol' imagelistpath=''>
139
<CommList param1='//' param2='' />
140
<CommList param1='/\*' param2='\*/' />
141
<Group name='FUNCTION' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
142
    <Rules regexbeg='^[ \t]*fun[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
143
</Group>
144
<Group name='TYPEOF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
145
    <Rules regexbeg='^[ \t]*typeof[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
146
</Group>
147
<Group name='VAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
148
    <Rules regexbeg='^[ \t]*var[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
149
</Group>
150
<Group name='PROTO' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
151
    <Rules regexbeg='^[ \t]*proto[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
152
</Group>
153
<Group name='STRUCT' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
154
    <Rules regexbeg='^[ \t]*struct[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
155
</Group>
156
<Group name='TYPEDEF' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
157
    <Rules regexbeg='^[ \t]*typedef[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
158
</Group>
159
<Group name='DEFCOM' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
160
    <Rules regexbeg='^[ \t]*defcom[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
161
</Group>
162
<Group name='DEFCOMVAR' subgroup='' icon='0' child='0' autoexp='0' matchcase='1' fendtobbeg='' bbegtobend=''>
163
    <Rules regexbeg='^[ \t]*defcomvar[ \t]+' regexfunc='[a-zA-Z0-9_]+' regexend='' bodybegin='\=' bodyend=';;' sep='' />
164
</Group>
165
</Language>
166
</pre>
167
168
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.
169
170
!http://www.irizone.net/sites/default/files/styles/large/public/field/image/app_notepad_img1.png!