-
Notifications
You must be signed in to change notification settings - Fork 1
/
csv.lang
192 lines (170 loc) · 6.85 KB
/
csv.lang
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<?xml version="1.0" encoding="UTF-8"?>
<!--
Rainbow csv syntax higlighting
Author: Ignatovich Dmitry
-->
<!--
Installation Instructions:
Place this file in your gtksourceview-2.0/language-specs directory
and make sure that it is readable for the user(s).
You must have root access to access to place it into
/usr/share/gtksourceview-2.0/language-specs/
but as a regular user you can also put it under
~/.gnome2/gtksourceview-2.0/language-specs/
The syntax definition contains some styles that are not present in
the default style definitions. Therefore you must add the following lines
to every xml style file in /usr/share/gtksourceview-2.0/styles/
in the <style-scheme> section:
<style name="csv:srbcol1" foreground="#FF0000" bold="true"/>
<style name="csv:srbcol2" foreground="#0000FF" bold="true"/>
<style name="csv:srbcol3" foreground="#00A000" bold="true"/>
<style name="csv:srbcol4" foreground="#FF00FF" bold="true"/>
<style name="csv:srbcol5" foreground="#964B00" bold="true"/>
<style name="csv:srbcol6" foreground="#FF0000" bold="false"/>
<style name="csv:srbcol7" foreground="#0000FF" bold="false"/>
<style name="csv:srbcol8" foreground="#009000" bold="false"/>
<style name="csv:srbcol9" foreground="#FF00FF" bold="false"/>
(look for "Language specific styles")
You may want to adjust the colors according to your style template.
If you don't have root access copy the xml files to
~/.gnome2/gtksourceview-2.0/styles/
and edit them there. Then you must probably go to
Edit > Preferences > Font & colors to add the correct Color Schemes
-->
<language id="csv" _name="CSV" version="2.0" _section="Others">
<metadata>
<property name="globs">*.csv</property>
</metadata>
<styles>
<style id="srbcol1" _name="NRBCol1"/>
<style id="srbcol2" _name="NRBCol2"/>
<style id="srbcol3" _name="NRBCol3"/>
<style id="srbcol4" _name="NRBCol4"/>
<style id="srbcol5" _name="NRBCol5"/>
<style id="srbcol6" _name="NRBCol6"/>
<style id="srbcol7" _name="NRBCol7"/>
<style id="srbcol8" _name="NRBCol8"/>
<style id="srbcol9" _name="NRBCol9"/>
</styles>
<default-regex-options case-sensitive="false" />
<definitions>
<context id="rbgroup_10">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
<context sub-pattern="6" style-ref="srbcol6"/>
<context sub-pattern="7" style-ref="srbcol7"/>
<context sub-pattern="8" style-ref="srbcol8"/>
<context sub-pattern="9" style-ref="srbcol9"/>
</include>
</context>
<context id="rbgroup_9">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
<context sub-pattern="6" style-ref="srbcol6"/>
<context sub-pattern="7" style-ref="srbcol7"/>
<context sub-pattern="8" style-ref="srbcol8"/>
<context sub-pattern="9" style-ref="srbcol9"/>
</include>
</context>
<context id="rbgroup_8">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
<context sub-pattern="6" style-ref="srbcol6"/>
<context sub-pattern="7" style-ref="srbcol7"/>
<context sub-pattern="8" style-ref="srbcol8"/>
</include>
</context>
<context id="rbgroup_7">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
<context sub-pattern="6" style-ref="srbcol6"/>
<context sub-pattern="7" style-ref="srbcol7"/>
</include>
</context>
<context id="rbgroup_6">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
<context sub-pattern="6" style-ref="srbcol6"/>
</include>
</context>
<context id="rbgroup_5">
<match>([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
<context sub-pattern="5" style-ref="srbcol5"/>
</include>
</context>
<context id="rbgroup_4">
<match>([^,]*),([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
<context sub-pattern="4" style-ref="srbcol4"/>
</include>
</context>
<context id="rbgroup_3">
<match>([^,]*),([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
<context sub-pattern="3" style-ref="srbcol3"/>
</include>
</context>
<context id="rbgroup_2">
<match>([^,]*),([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
<context sub-pattern="2" style-ref="srbcol2"/>
</include>
</context>
<context id="rbgroup_1">
<match>([^,]*)(,|$)</match>
<include>
<context sub-pattern="1" style-ref="srbcol1"/>
</include>
</context>
<context id="csv" class="no-spell-check">
<include>
<context ref="rbgroup_10"/>
<context ref="rbgroup_9"/>
<context ref="rbgroup_8"/>
<context ref="rbgroup_7"/>
<context ref="rbgroup_6"/>
<context ref="rbgroup_5"/>
<context ref="rbgroup_4"/>
<context ref="rbgroup_3"/>
<context ref="rbgroup_2"/>
<context ref="rbgroup_1"/>
</include>
</context>
</definitions>
</language>