-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCodeMap.sublime-settings
More file actions
253 lines (246 loc) · 9.45 KB
/
Copy pathCodeMap.sublime-settings
File metadata and controls
253 lines (246 loc) · 9.45 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
{
"close_empty_group_on_closing_map": true,
"show_in_new_group": true,
// width percentage of the screen
"codemap_width": 0.17,
// some extensions can cause trouble if they aren't defined in advance, or
// even if you try to define them. Extensions in this list will be ignored.
"exclusions": [
"json"
],
// Map depth is remembered per view, so if you change depth in one file,
// the others will still use the global setting below.
// Depth doesn't work for custom mappers in User/CodeMap/custom_mappers,
// unless you make a mapper that supports it by reading this setting.
"depth": 1,
////////////////////////////////////////////////////////////////////
// IMPORTANT - READ CAREFULLY //
// //
// Order of preference for mappers is: //
// //
// 1. defined mappers below, except "universal" //
// 2. mappers in User/CodeMap/custom_mappers //
// 3. "universal" mapper (as a fallback) //
// //
// //
// If a file extension is defined in "syntaxes" below, it WILL //
// override custom mappers. To avoid this, if you want //
// to use a custom mapper for an extension defined there //
// (in "syntaxes"), you must comment out or delete the //
// extension from the "syntaxes" items below. //
// //
////////////////////////////////////////////////////////////////////
// defined mappers with preferred extension, universal is used as a backup
// for undefined syntaxes; to use the defined mappers below, they must be
// present in this list. Don't put anything in this list that isn't
// defined below.
"syntaxes": [
["universal", ""],
["text", "txt"],
["Rexx", "rex"],
["python", "py"],
["ruby", "rb"],
["Settings", "sublime-settings"],
["Syntax", "sublime-syntax"],
["Ini", "ini"],
],
///////////////////////////////////////////////////////////////////
// For each defined mapper: //
///////////////////////////////////////////////////////////////////
//
// "regex": patterns to recognize, the inner list has elements:
// [0]: what to search in the line
// [1]: pattern to strip from [0]
// [2]: optional substitution for [1]
// [3]: whether the every pattern, in case of multiple patterns will be
// applied on the same original document line or to the result of
// previous regex match/transformation step.
//
// These elements are themselves in a list, because you can define more
// substitution patterns. So you have a list of patterns to recognize, and
// each of them has 4 elements. The different match/substitution patterns
// are evaluated independently, and the longest match is accepted,
// therefore try not to enter patterns that are very generic together with
// other that are more specifc. If [3] is true, the regex will be
// reapplied to the same line, if you need so.
//
////////////////////////////////////////////////////
// The other elements are: //
////////////////////////////////////////////////////
//
// "obligatory indent": lines that aren't indented are ignored
// "indent": base indent for Code Map view
// "empty line in map before": empty line in the Code Map before this
// pattern, after regexes have been applied
// "line numbers before": write numbers at the beginning of the line
// "prefix"/"suffix": applied to each line
// "syntax": syntax for Code Map
"universal": {
"regex":
[
[
"^(?!if)\\S+? \\S+?[\\(\\[\\{].*?:",
"[\\(\\[\\{].*$",
"",
false
]
],
"indent": 2,
"obligatory indent": false,
"empty line in map before": "class",
"line numbers before": false,
"prefix": "",
"suffix": "",
"syntax": "Packages/Python/Python.tmLanguage"
},
"text": {
"regex":
[
[
"",
"",
"",
false
]
],
"indent": 2,
"obligatory indent": true,
"empty line in map before": "",
"line numbers before": true,
"prefix": "",
"suffix": "",
"syntax": "Packages/Text/Plain text.tmLanguage"
},
"python": {
"regex":
[
[
"^(class |def ).*$",
"[(:].*$",
"",
false
]
],
"indent": 4,
"obligatory indent": false,
"empty line in map before": "class",
"line numbers before": false,
"prefix": "",
"suffix": "()",
"syntax": "Packages/Python/Python.tmLanguage"
},
"ruby": {
"regex":
[
[
"^(class |def ).*$",
"[(:].*$",
"",
false
]
],
"indent": 2,
"obligatory indent": false,
"empty line in map before": "class",
"line numbers before": false,
"prefix": "",
"suffix": "()",
"syntax": "Packages/Ruby/Ruby.tmLanguage"
},
"Settings": {
"regex":
[
[
"^\".+\":",
"\"(.+)\":",
"\\g<1>:",
false
],
[
": +true,",
"true",
"True",
true
],
[
": +false,",
"false",
"False",
true
],
[
": +\\[$",
"\\[",
"[]",
true
],
[
": +\\{$",
"\\{",
"{}",
true
],
],
"indent": 0,
"obligatory indent": false,
"empty line in map before": "",
"line numbers before": false,
"prefix": "",
"suffix": "",
"syntax": "Packages/Python/Python.tmLanguage"
},
"Syntax": {
"regex":
[
[
"^(contexts:|\\w+:)$",
"",
"",
false
]
],
"indent": 2,
"obligatory indent": false,
"empty line in map before": "",
"line numbers before": false,
"prefix": "",
"suffix": "",
"syntax": "Packages/YAML/YAML.sublime-syntax"
},
"Ini": {
"regex":
[
[
"^\\[.*$",
"",
"",
false
]
],
"indent": 0,
"obligatory indent": false,
"empty line in map before": "class",
"line numbers before": false,
"prefix": "",
"suffix": "",
"syntax": "Packages/Text/Plain text.tmLanguage"
},
"Rexx" : {
"regex":
[
[
"^(?!')(\\S+:)\\s.*$",
"[(:].*$",
"",
false
]
],
"indent": 4,
"obligatory indent": false,
"empty line in map before": "",
"line numbers before": false,
"prefix": "",
"suffix": "()",
"syntax": "Packages/Text/Plain text.tmLanguage"
},
}