blob: a5d2ab0845a53036aa5c1cb410ed7155694ea1ab (
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
|
\starttext
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.
In the \CONTEXT\ distribution you find the relevant files in:
\starttyping
<contextroot>/tex/texmf-context/context/data/scite
\stoptyping
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-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-pragma.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-context-internal.properties
scite-ctx-context-external.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.
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
In a similar fashion you can drive the interface checking:
\starttyping
% interface=nl
\stoptyping
\stoptext
|