blob: 3a6d673c5962c3baa0afff7182fac752ed8315d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
\starttext
\subject{Installing Scite}
Scite has built-in lexers as well as external lpeg based ones. We
can use both but for the external lexers some more work is needed
to get them running. As they are more advanced it's worth the
effort.
First you need to install Scite. Just get the latest greatest from:
\starttyping
www.scintilla.org
\stoptyping
Next you need to install the lpeg lexers. These can be fetched from:
\starttyping
code.google.com/p/scintilla
\stoptyping
On windows you need to copy the \type {lexers} subfolder to the \type
{wscite} folder. For Linux the place depends on the distribution.
\subject{Extending Scite}
In the \CONTEXT\ distribution you find the relevant files in:
\starttyping
<contextroot>/tex/texmf-context/context/data/scite
\stoptyping
The easy way is to copy all the files in that path to the path where
the global properties files lives
\starttyping
SciteGlobal.properties
\stoptyping
At the end of that file (on windows it is in the path where the Scite
binary) you then add a line to the end:
\starttyping
import scite-context-user
\stoptyping
You need to restart Scite in order to see if things work out as expected.
Disabling the external lexer in a recent Scite is somewhat tricky. In that
case the end of that file looks like:
\starttyping
imports.exclude=scite-context-external
import *
import scite-context-user
\stoptyping
In any case you need to make sure that the user file is loaded last.
\subject{An alternative approach}
If for some reason you prefer not to mess with property files in the main
Scite path, you can follow a different route and selectively copy files to
places.
The following files are needed for the lpeg based lexer:
\starttyping
lexers/scite-context-lexer.lua
lexers/scite-context-lexer-tex.lua
lexers/scite-context-lexer-mps.lua
lexers/scite-context-lexer-lua.lua
lexers/scite-context-lexer-cld.lua
lexers/context/data/scite-context-data-tex.lua
lexers/context/data/scite-context-data-context.lua
lexers/context/data/scite-context-data-interfaces.lua
lexers/context/data/scite-context-data-metapost.lua
lexers/context/data/scite-context-data-metafun.lua
lexers/themes/scite-context-theme.lua
\stoptyping
The data files are needed because we cannot access property files
from within the lexer. If we could open a file we could use the
property files instead.
These files go to the \type {lexers} subpath in your Scite
installation. Normally this sits in the binary path. The
following files provide some extensions. On windows you can copy
these files to the path where the scite binary lives.
\starttyping
scite-ctx.lua
\stoptyping
Because property files can only be loaded from the same path
where the (user) file loads them you need to copy the following
files to the same path where the loading is defined:
\starttyping
scite-context.properties
scite-context-internal.properties
scite-context-external.properties
scite-pragma.properties
scite-tex.properties
scite-metapost.properties
scite-context-data-tex.properties
scite-context-data-context.properties
scite-context-data-interfaces.properties
scite-context-data-metapost.properties
scite-context-data-metafun.properties
scite-ctx.properties
scite-ctx-context.properties
scite-ctx-example.properties
\stoptyping
On Windows these go to:
\starttyping
c:/Users/YourName
\stoptyping
Next you need to add this to:
\starttyping
import scite-context
import scite-context-internal
import scite-context-external
import scite-pragma
\stoptyping
to the file:
\starttyping
SciTEUser.properties
\stoptyping
Of course the pragma import is optional. You can comment either the
internal or external variant but there is no reason not to keep them both.
\subject{Spell checking}
If you want to have spellchecking, you need have files with correct words
on each line. The first line of a file determines the language:
\starttyping
% language=uk
\stoptyping
In this case the following file is needed:
\starttyping
spell-uk.txt
\stoptyping
This file is searched on the the path determined by the environment variable:
\starttyping
CTXSPELLPATH
\stoptyping
\subject{Interface selection}
In a similar fashion you can drive the interface checking:
\starttyping
% interface=nl
\stoptyping
\stoptext
|