ver 2009.10.14
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1404 -0
- data/MANIFEST +187 -0
- data/Rakefile +30 -0
- data/TODO +169 -0
- data/bin/ver +19 -0
- data/config/detect.rb +109 -0
- data/config/keymap/vim.rb +239 -0
- data/config/rc.rb +0 -0
- data/config/scratch +3 -0
- data/config/syntax/ANTLR.json +275 -0
- data/config/syntax/ASP VB.net.json +228 -0
- data/config/syntax/ASP.json +135 -0
- data/config/syntax/ActionScript.json +168 -0
- data/config/syntax/Ada.json +108 -0
- data/config/syntax/Apache.json +342 -0
- data/config/syntax/AppleScript.json +721 -0
- data/config/syntax/Bibtex.json +253 -0
- data/config/syntax/Blog (HTML).json +47 -0
- data/config/syntax/Blog (Markdown).json +50 -0
- data/config/syntax/Blog (Text).json +45 -0
- data/config/syntax/Blog (Textile).json +45 -0
- data/config/syntax/Bulletin Board.json +428 -0
- data/config/syntax/C++.json +323 -0
- data/config/syntax/C.json +694 -0
- data/config/syntax/CSS.json +346 -0
- data/config/syntax/DOT.json +79 -0
- data/config/syntax/Diff.json +136 -0
- data/config/syntax/Dylan.json +104 -0
- data/config/syntax/Eiffel.json +128 -0
- data/config/syntax/Erlang.json +1636 -0
- data/config/syntax/F-Script.json +137 -0
- data/config/syntax/FXScript.json +260 -0
- data/config/syntax/Gri.json +141 -0
- data/config/syntax/HTML (Mason).json +207 -0
- data/config/syntax/HTML (Rails).json +52 -0
- data/config/syntax/HTML (Tcl).json +42 -0
- data/config/syntax/HTML for ASP.net.json +736 -0
- data/config/syntax/HTML-ASP.json +45 -0
- data/config/syntax/HTML.json +614 -0
- data/config/syntax/Haskell.json +407 -0
- data/config/syntax/Inform.json +80 -0
- data/config/syntax/Ini.json +91 -0
- data/config/syntax/Io.json +142 -0
- data/config/syntax/Java.json +745 -0
- data/config/syntax/JavaProperties.json +42 -0
- data/config/syntax/JavaScript.json +446 -0
- data/config/syntax/LaTeX Beamer.json +65 -0
- data/config/syntax/LaTeX Log.json +88 -0
- data/config/syntax/LaTeX.json +962 -0
- data/config/syntax/Lighttpd.json +93 -0
- data/config/syntax/Lisp.json +101 -0
- data/config/syntax/Literate Haskell.json +55 -0
- data/config/syntax/Logtalk.json +289 -0
- data/config/syntax/Lua.json +146 -0
- data/config/syntax/M.json +744 -0
- data/config/syntax/MEL.json +161 -0
- data/config/syntax/MIPS.json +114 -0
- data/config/syntax/Mail.json +224 -0
- data/config/syntax/Makefile.json +66 -0
- data/config/syntax/Markdown.json +644 -0
- data/config/syntax/Modula-3.json +80 -0
- data/config/syntax/Movable Type.json +348 -0
- data/config/syntax/OCaml.json +1391 -0
- data/config/syntax/Objective-C++.json +21 -0
- data/config/syntax/OpenGL.json +24 -0
- data/config/syntax/PHP.json +2184 -0
- data/config/syntax/Pascal.json +128 -0
- data/config/syntax/Perl.json +2091 -0
- data/config/syntax/Plain text.json +49 -0
- data/config/syntax/Processing.json +188 -0
- data/config/syntax/Quake3 Config.json +54 -0
- data/config/syntax/R.json +157 -0
- data/config/syntax/Rez.json +137 -0
- data/config/syntax/Ruby on Rails.json +170 -0
- data/config/syntax/Ruby.json +1753 -0
- data/config/syntax/SQL (Rails).json +31 -0
- data/config/syntax/SQL.json +435 -0
- data/config/syntax/SWIG.json +96 -0
- data/config/syntax/Scheme.json +359 -0
- data/config/syntax/Shell-Unix-Generic.json +1198 -0
- data/config/syntax/Slate.json +265 -0
- data/config/syntax/Smarty.json +110 -0
- data/config/syntax/Standard ML.json +322 -0
- data/config/syntax/Subversion commit message.json +62 -0
- data/config/syntax/Tcl.json +278 -0
- data/config/syntax/TeX Math.json +83 -0
- data/config/syntax/TeX.json +157 -0
- data/config/syntax/Textile.json +273 -0
- data/config/syntax/Twiki.json +436 -0
- data/config/syntax/Vectorscript.json +97 -0
- data/config/syntax/XML strict.json +148 -0
- data/config/syntax/XML.json +301 -0
- data/config/syntax/XSL.json +96 -0
- data/config/syntax/YAML.json +293 -0
- data/config/syntax/iCalendar.json +51 -0
- data/config/syntax/reStructuredText.json +403 -0
- data/config/theme/Active4D.json +260 -0
- data/config/theme/All Hallow's Eve.json +171 -0
- data/config/theme/Amy.json +359 -0
- data/config/theme/BBEdit.json +269 -0
- data/config/theme/Bespin.json +322 -0
- data/config/theme/Blackboard.json +215 -0
- data/config/theme/BoysAndGirls01.json +156 -0
- data/config/theme/Brilliance Black.json +1695 -0
- data/config/theme/Brilliance Dull.json +1451 -0
- data/config/theme/Classic Modified.json +288 -0
- data/config/theme/Cobalt.json +345 -0
- data/config/theme/Cool Glow.json +215 -0
- data/config/theme/Dawn.json +258 -0
- data/config/theme/Eiffel.json +270 -0
- data/config/theme/Espresso Libre.json +247 -0
- data/config/theme/Fluidvision.json +272 -0
- data/config/theme/IDLE.json +159 -0
- data/config/theme/LAZY.json +178 -0
- data/config/theme/Mac Classic.json +277 -0
- data/config/theme/MagicWB (Amiga).json +231 -0
- data/config/theme/Merbivore Soft.json +181 -0
- data/config/theme/Merbivore.json +181 -0
- data/config/theme/Monokai.json +177 -0
- data/config/theme/Notepad2.json +166 -0
- data/config/theme/Pastels on Dark.json +437 -0
- data/config/theme/RubyBlue.json +226 -0
- data/config/theme/Sin City 2.json +361 -0
- data/config/theme/Slate.json +270 -0
- data/config/theme/Slush & Poppies.json +232 -0
- data/config/theme/SpaceCadet.json +143 -0
- data/config/theme/Sunburst.json +415 -0
- data/config/theme/Twilight BG FG.json +633 -0
- data/config/theme/Twilight.json +321 -0
- data/config/theme/Whys Poignant.json +119 -0
- data/config/theme/Zenburnesque.json +237 -0
- data/config/theme/barf.json +155 -0
- data/config/theme/fake.json +418 -0
- data/config/theme/happydeluxe.json +114 -0
- data/config/theme/iLife 05.json +393 -0
- data/config/theme/iPlastic.json +177 -0
- data/config/theme/mintBlue Dark.json +414 -0
- data/config/theme/mintBlue.json +415 -0
- data/config/theme/monoindustrial.json +276 -0
- data/config/theme/starlight.json +67 -0
- data/config/tutorial +74 -0
- data/config/welcome +115 -0
- data/help/index.verh +14 -0
- data/lib/ver.rb +156 -0
- data/lib/ver/entry.rb +97 -0
- data/lib/ver/keymap.rb +96 -0
- data/lib/ver/layout.rb +107 -0
- data/lib/ver/methods.rb +19 -0
- data/lib/ver/methods/completion.rb +116 -0
- data/lib/ver/methods/control.rb +340 -0
- data/lib/ver/methods/insert.rb +6 -0
- data/lib/ver/methods/move.rb +65 -0
- data/lib/ver/methods/search.rb +33 -0
- data/lib/ver/methods/select.rb +145 -0
- data/lib/ver/methods/views.rb +21 -0
- data/lib/ver/mode.rb +160 -0
- data/lib/ver/options.rb +207 -0
- data/lib/ver/plist.rb +106 -0
- data/lib/ver/status.rb +67 -0
- data/lib/ver/syntax.rb +68 -0
- data/lib/ver/syntax/detector.rb +53 -0
- data/lib/ver/syntax/processor.rb +48 -0
- data/lib/ver/text.rb +374 -0
- data/lib/ver/textpow.rb +357 -0
- data/lib/ver/theme.rb +162 -0
- data/lib/ver/vendor/fuzzy_file_finder.rb +340 -0
- data/lib/ver/view.rb +163 -0
- data/lib/ver/view/entry.rb +28 -0
- data/lib/ver/view/list.rb +137 -0
- data/lib/ver/view/list/buffer.rb +27 -0
- data/lib/ver/view/list/fuzzy_file_finder.rb +44 -0
- data/lib/ver/view/list/syntax.rb +13 -0
- data/lib/ver/view/list/theme.rb +13 -0
- data/spec/keymap.rb +224 -0
- data/tasks/bacon.rake +49 -0
- data/tasks/changelog.rake +18 -0
- data/tasks/gem.rake +22 -0
- data/tasks/gem_installer.rake +76 -0
- data/tasks/grancher.rake +12 -0
- data/tasks/install_dependencies.rake +6 -0
- data/tasks/manifest.rake +4 -0
- data/tasks/plist2json.rake +35 -0
- data/tasks/rcov.rake +18 -0
- data/tasks/release.rake +12 -0
- data/tasks/reversion.rake +8 -0
- data/tasks/syntax_list.rake +31 -0
- data/ver.gemspec +29 -0
- metadata +241 -0
@@ -0,0 +1,239 @@
|
|
1
|
+
module VER
|
2
|
+
class Keymap
|
3
|
+
def self.vim(options)
|
4
|
+
vim = new(options)
|
5
|
+
vim.mode = options.fetch(:mode, :control)
|
6
|
+
|
7
|
+
vim.add_mode :basic do |mode|
|
8
|
+
mode.map :file_open_popup, %w[Control-o]
|
9
|
+
mode.map :file_open_fuzzy, %w[Alt-o], %w[Control-m o]
|
10
|
+
mode.map :status_evaluate, %w[Alt-x], %w[Control-m x]
|
11
|
+
mode.map :file_save, %w[Control-s]
|
12
|
+
mode.map :file_save_popup, %w[Control-Alt-s]
|
13
|
+
mode.map :quit, %w[Control-q]
|
14
|
+
mode.map :start_control_mode, %w[Escape], %w[Control-c]
|
15
|
+
|
16
|
+
mode.map :buffer_switch, %w[Alt-b], %w[Control-m b]
|
17
|
+
mode.map :window_switch, %w[Alt-B], %w[Control-m B]
|
18
|
+
end
|
19
|
+
|
20
|
+
vim.add_mode :views do |mode|
|
21
|
+
mode.map :view_create, %w[Control-w Control-c]
|
22
|
+
mode.map :view_focus_next, %w[Control-w Control-j]
|
23
|
+
mode.map :view_focus_prev, %w[Control-w Control-k]
|
24
|
+
mode.map :view_close, %w[Control-w Control-w]
|
25
|
+
end
|
26
|
+
|
27
|
+
vim.add_mode :move do |mode|
|
28
|
+
mode.map :go_beginning_of_line, %w[0]
|
29
|
+
mode.map :go_char_left, %w[h], %w[Left]
|
30
|
+
mode.map :go_char_right, %w[l], %w[Right]
|
31
|
+
mode.map :go_end_of_file, %w[G]
|
32
|
+
mode.map :go_end_of_line, %w[dollar]
|
33
|
+
mode.map :go_line, %w[g g]
|
34
|
+
mode.map :go_line_down, %w[j], %w[Down]
|
35
|
+
mode.map :go_line_up, %w[k], %w[Up]
|
36
|
+
mode.map :go_next_newline_block, %w[braceleft]
|
37
|
+
mode.map :go_page_down, %w[Control-f], %w[Next]
|
38
|
+
mode.map :go_page_up, %w[Control-b], %w[Prior]
|
39
|
+
mode.map :go_prev_newline_block, %w[braceright]
|
40
|
+
mode.map :go_word_left, %w[b]
|
41
|
+
mode.map :go_word_right, %w[w]
|
42
|
+
end
|
43
|
+
|
44
|
+
vim.add_mode :search do |mode|
|
45
|
+
mode.map :search_next, %w[n]
|
46
|
+
mode.map :search_next_word_under_cursor, %w[asterisk]
|
47
|
+
mode.map :search_prev, %w[N]
|
48
|
+
mode.map :search_prev_word_under_cursor, %w[numbersign]
|
49
|
+
mode.map :status_search, %w[slash]
|
50
|
+
end
|
51
|
+
|
52
|
+
vim.add_mode :control do |mode|
|
53
|
+
mode.inherits :basic, :move, :views, :search
|
54
|
+
|
55
|
+
mode.map :copy_left_word, %w[y b]
|
56
|
+
mode.map :copy_line, %w[y y], %w[Y]
|
57
|
+
mode.map :copy_right_word, %w[y w]
|
58
|
+
mode.map :delete_char_left, %w[X]
|
59
|
+
mode.map :delete_char_right, %w[x]
|
60
|
+
mode.map :delete_line, %w[d d]
|
61
|
+
mode.map :delete_to_eol, %w[D]
|
62
|
+
mode.map :delete_to_eol_then_insert, %w[C]
|
63
|
+
mode.map :delete_word_left, %w[d b]
|
64
|
+
mode.map :delete_word_right, %w[d w]
|
65
|
+
mode.map :eol_then_insert_mode, %w[A]
|
66
|
+
mode.map :indent_line, %w[greater]
|
67
|
+
mode.map :insert_indented_newline_above, %w[O]
|
68
|
+
mode.map :insert_indented_newline_below, %w[o]
|
69
|
+
mode.map :join_lines, %w[J]
|
70
|
+
mode.map :paste, %w[p]
|
71
|
+
mode.map :redo, %w[Control-r]
|
72
|
+
mode.map :smart_evaluate, %w[Alt-e], %w[Control-m e]
|
73
|
+
mode.map :sol_then_insert_mode, %w[I]
|
74
|
+
mode.map :start_insert_mode, %w[i]
|
75
|
+
mode.map :start_replace_mode, %w[R]
|
76
|
+
mode.map :start_select_block_mode, %w[Control-v]
|
77
|
+
mode.map :start_select_char_mode, %w[v]
|
78
|
+
mode.map :start_select_line_mode, %w[V]
|
79
|
+
mode.map :undo, %w[u]
|
80
|
+
mode.map :unindent_line, %w[less]
|
81
|
+
mode.map :replace_char, %w[r]
|
82
|
+
mode.map :status_theme_select, %w[Alt-t], %w[Control-m t]
|
83
|
+
mode.map :theme_switch, %w[Control-t]
|
84
|
+
mode.map :syntax_switch, %w[Control-y]
|
85
|
+
|
86
|
+
mode.missing :ignore_string
|
87
|
+
end
|
88
|
+
|
89
|
+
vim.add_mode :replace do |mode|
|
90
|
+
mode.inherits :basic
|
91
|
+
end
|
92
|
+
|
93
|
+
vim.add_mode :readline do |mode|
|
94
|
+
mode.arguments = false
|
95
|
+
|
96
|
+
mode.map :delete_char_left, %w[BackSpace]
|
97
|
+
mode.map :delete_char_right, %w[Delete]
|
98
|
+
mode.map :go_char_left, %w[Left]
|
99
|
+
mode.map :go_char_right, %w[Right]
|
100
|
+
mode.map :go_word_left, %w[Shift-Left]
|
101
|
+
mode.map :go_word_right, %w[Shift-Right]
|
102
|
+
|
103
|
+
# Map Tk keysyms
|
104
|
+
{ " " => "space",
|
105
|
+
"!" => "exclam",
|
106
|
+
'"' => "quotedbl",
|
107
|
+
"#" => "numbersign",
|
108
|
+
"$" => "dollar",
|
109
|
+
"%" => "percent",
|
110
|
+
"&" => "ampersand",
|
111
|
+
"'" => "quoteright",
|
112
|
+
"(" => "parenleft",
|
113
|
+
")" => "parenright",
|
114
|
+
"*" => "asterisk",
|
115
|
+
"+" => "plus",
|
116
|
+
"," => "comma",
|
117
|
+
"-" => "minus",
|
118
|
+
"." => "period",
|
119
|
+
"/" => "slash",
|
120
|
+
"0" => "0",
|
121
|
+
"1" => "1",
|
122
|
+
"2" => "2",
|
123
|
+
"3" => "3",
|
124
|
+
"4" => "4",
|
125
|
+
"5" => "5",
|
126
|
+
"6" => "6",
|
127
|
+
"7" => "7",
|
128
|
+
"8" => "8",
|
129
|
+
"9" => "9",
|
130
|
+
":" => "colon",
|
131
|
+
";" => "semicolon",
|
132
|
+
"<" => "less",
|
133
|
+
"=" => "equal",
|
134
|
+
">" => "greater",
|
135
|
+
"?" => "question",
|
136
|
+
"@" => "at",
|
137
|
+
"[" => "bracketleft",
|
138
|
+
"\\" => "backslash",
|
139
|
+
"]" => "bracketright",
|
140
|
+
"^" => "asciicircum",
|
141
|
+
"_" => "underscore",
|
142
|
+
"`" => "quoteleft",
|
143
|
+
"{" => "braceleft",
|
144
|
+
"|" => "bar",
|
145
|
+
"}" => "braceright",
|
146
|
+
"~" => "asciitilde",
|
147
|
+
}.each do |sym, name|
|
148
|
+
mode.map [:insert_string, sym], [name]
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
vim.add_mode :insert do |mode|
|
153
|
+
mode.inherits :basic, :views, :readline
|
154
|
+
mode.arguments = false
|
155
|
+
|
156
|
+
mode.map :go_line_down, %w[Down]
|
157
|
+
mode.map :go_line_up, %w[Up]
|
158
|
+
mode.map :go_page_down, %w[Control-f], %w[Next]
|
159
|
+
mode.map :go_page_down, %w[Shift-Down]
|
160
|
+
mode.map :go_page_up, %w[Control-b], %w[Prior]
|
161
|
+
mode.map :go_page_up, %w[Shift-Up]
|
162
|
+
mode.map :insert_indented_newline, %w[Return]
|
163
|
+
mode.map :smart_evaluate, %w[Alt-e], %w[Control-e]
|
164
|
+
mode.map :complete_aspell, %w[Control-x Control-a]
|
165
|
+
mode.map :complete_file, %w[Control-x Control-f]
|
166
|
+
|
167
|
+
mode.missing :insert_string
|
168
|
+
end
|
169
|
+
|
170
|
+
vim.add_mode :select do |mode|
|
171
|
+
mode.inherits :basic, :move, :search
|
172
|
+
|
173
|
+
mode.map :copy_selection, %w[y], %w[Y]
|
174
|
+
mode.map :delete_selection, %w[d], %w[D], %w[x], %w[BackSpace], %w[Delete]
|
175
|
+
mode.map :indent_selection, %w[greater]
|
176
|
+
mode.map :pipe_selection, %w[exclam]
|
177
|
+
mode.map :smart_evaluate, %w[Alt-e], %w[Control-e]
|
178
|
+
mode.map :switch_select_block_mode, %w[Control-v]
|
179
|
+
mode.map :switch_select_char_mode, %w[v]
|
180
|
+
mode.map :switch_select_line_mode, %w[V]
|
181
|
+
mode.map :unindent_selection, %w[less]
|
182
|
+
mode.map :comment_selection, %w[comma c]
|
183
|
+
mode.map :uncomment_selection, %w[comma u]
|
184
|
+
end
|
185
|
+
|
186
|
+
vim.add_mode :select_char do |mode|
|
187
|
+
mode.inherits :select
|
188
|
+
end
|
189
|
+
|
190
|
+
vim.add_mode :select_line do |mode|
|
191
|
+
mode.inherits :select
|
192
|
+
end
|
193
|
+
|
194
|
+
vim.add_mode :select_block do |mode|
|
195
|
+
mode.inherits :select
|
196
|
+
end
|
197
|
+
|
198
|
+
vim.add_mode :complete do |mode|
|
199
|
+
mode.inherits :basic
|
200
|
+
|
201
|
+
mode.to :complete_file, %w[Control-x Control-f]
|
202
|
+
mode.to :complete_line, %w[Control-x Control-l]
|
203
|
+
mode.to :complete_omni, %w[Control-x Control-o]
|
204
|
+
mode.to :complete_word, %w[Control-x Control-i]
|
205
|
+
end
|
206
|
+
|
207
|
+
vim.add_mode :status_query do |mode|
|
208
|
+
mode.inherits :basic, :readline
|
209
|
+
|
210
|
+
mode.to :ask_abort, %w[Escape], %w[Control-c]
|
211
|
+
mode.to :ask_submit, %w[Return]
|
212
|
+
|
213
|
+
mode.missing :insert_string
|
214
|
+
end
|
215
|
+
|
216
|
+
vim.add_mode :list_view_entry do |mode|
|
217
|
+
mode.inherits :basic, :readline
|
218
|
+
|
219
|
+
# mode.to :update, %w[Key]
|
220
|
+
mode.to :pick_selection, %w[Return]
|
221
|
+
mode.to :cancel, %w[Escape], %w[Control-c]
|
222
|
+
mode.to :go_line_up, %w[Up]
|
223
|
+
mode.to :go_line_down, %w[Down]
|
224
|
+
|
225
|
+
mode.missing :insert_string
|
226
|
+
end
|
227
|
+
|
228
|
+
vim.add_mode :list_view_list do |mode|
|
229
|
+
mode.inherits :basic
|
230
|
+
|
231
|
+
mode.to :pick_selection, %w[Double-Button-1]
|
232
|
+
mode.to :go_line_up, %w[Up]
|
233
|
+
mode.to :go_line_down, %w[Down]
|
234
|
+
end
|
235
|
+
|
236
|
+
vim
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
data/config/rc.rb
ADDED
File without changes
|
data/config/scratch
ADDED
@@ -0,0 +1,275 @@
|
|
1
|
+
{
|
2
|
+
"fileTypes": [
|
3
|
+
"g"
|
4
|
+
],
|
5
|
+
"foldingStartMarker": "\/\\*(?!\\*\/)|\\{\\s*$",
|
6
|
+
"foldingStopMarker": "\\*\/|^\\s*\\}",
|
7
|
+
"keyEquivalent": "^~A",
|
8
|
+
"name": "ANTLR",
|
9
|
+
"patterns": [
|
10
|
+
{
|
11
|
+
"include": "#strings"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"include": "#comments"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"begin": "\\boptions\\b",
|
18
|
+
"beginCaptures": {
|
19
|
+
"0": {
|
20
|
+
"name": "keyword.other.options.antlr"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"end": "(?<=\\})",
|
24
|
+
"name": "meta.options.antlr",
|
25
|
+
"patterns": [
|
26
|
+
{
|
27
|
+
"begin": "\\{",
|
28
|
+
"captures": {
|
29
|
+
"0": {
|
30
|
+
"name": "punctuation.section.options.antlr"
|
31
|
+
}
|
32
|
+
},
|
33
|
+
"end": "\\}",
|
34
|
+
"name": "meta.options-block.antlr",
|
35
|
+
"patterns": [
|
36
|
+
{
|
37
|
+
"include": "#strings"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"include": "#comments"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"match": "\\b\\d+\\b",
|
44
|
+
"name": "constant.numeric.antlr"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"match": "\\b(k|charVocabulary|filter|greedy|paraphrase|exportVocab|buildAST|defaultErrorHandler|language|namespace|namespaceStd|namespaceAntlr|genHashLines)\\b",
|
48
|
+
"name": "variable.other.option.antlr"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"match": "\\b(true|false)\\b",
|
52
|
+
"name": "constant.language.boolean.antlr"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
]
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"begin": "^(class)\\b\\s+(\\w+)",
|
60
|
+
"captures": {
|
61
|
+
"1": {
|
62
|
+
"name": "storage.type.antlr"
|
63
|
+
},
|
64
|
+
"2": {
|
65
|
+
"name": "entity.name.type.class.antlr"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"end": ";",
|
69
|
+
"name": "meta.definition.class.antlr",
|
70
|
+
"patterns": [
|
71
|
+
{
|
72
|
+
"begin": "\\b(extends)\\b\\s+",
|
73
|
+
"captures": {
|
74
|
+
"1": {
|
75
|
+
"name": "storage.modifier.antlr"
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"end": "(?=;)",
|
79
|
+
"name": "meta.definition.class.extends.antlr",
|
80
|
+
"patterns": [
|
81
|
+
{
|
82
|
+
"match": "\\b(Parser|Lexer|TreeWalker)\\b",
|
83
|
+
"name": "support.class.antlr"
|
84
|
+
}
|
85
|
+
]
|
86
|
+
}
|
87
|
+
]
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"match": "^protected\\b",
|
91
|
+
"name": "storage.modifier.antlr"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"match": "^[[:upper:]_][[:upper:][:digit:]_]*\\b",
|
95
|
+
"name": "entity.name.type.token.antlr"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"captures": {
|
99
|
+
"1": {
|
100
|
+
"name": "entity.name.function.rule.antlr"
|
101
|
+
},
|
102
|
+
"2": {
|
103
|
+
"name": "keyword.control.antlr"
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"match": "^(\\w+)(?:\\s+(returns\\b))?",
|
107
|
+
"name": "meta.rule.antlr"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"match": "\\b[[:upper:]_][[:upper:][:digit:]_]*\\b",
|
111
|
+
"name": "constant.other.token.antlr"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"include": "#nested-curly"
|
115
|
+
}
|
116
|
+
],
|
117
|
+
"repository": {
|
118
|
+
"comments": {
|
119
|
+
"patterns": [
|
120
|
+
{
|
121
|
+
"begin": "\/\\*",
|
122
|
+
"captures": {
|
123
|
+
"0": {
|
124
|
+
"name": "punctuation.definition.comment.antlr"
|
125
|
+
}
|
126
|
+
},
|
127
|
+
"end": "\\*\/",
|
128
|
+
"name": "comment.block.antlr"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"captures": {
|
132
|
+
"1": {
|
133
|
+
"name": "punctuation.definition.comment.antlr"
|
134
|
+
}
|
135
|
+
},
|
136
|
+
"match": "(\/\/).*$\\n?",
|
137
|
+
"name": "comment.line.double-slash.antlr"
|
138
|
+
}
|
139
|
+
]
|
140
|
+
},
|
141
|
+
"nested-curly": {
|
142
|
+
"begin": "\\{",
|
143
|
+
"captures": {
|
144
|
+
"0": {
|
145
|
+
"name": "punctuation.section.group.antlr"
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"end": "\\}",
|
149
|
+
"name": "source.embedded.java-or-c.antlr",
|
150
|
+
"patterns": [
|
151
|
+
{
|
152
|
+
"match": "\\b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\\b",
|
153
|
+
"name": "keyword.control.java-or-c"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"match": "\\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\b",
|
157
|
+
"name": "storage.type.java-or-c"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
|
161
|
+
"name": "storage.modifier.java-or-c"
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
|
165
|
+
"name": "constant.language.java-or-c"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"match": "\\b(sizeof)\\b",
|
169
|
+
"name": "keyword.operator.sizeof.java-or-c"
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
|
173
|
+
"name": "constant.numeric.java-or-c"
|
174
|
+
},
|
175
|
+
{
|
176
|
+
"begin": "\"",
|
177
|
+
"beginCaptures": {
|
178
|
+
"0": {
|
179
|
+
"name": "punctuation.definition.string.begin.java-or-c"
|
180
|
+
}
|
181
|
+
},
|
182
|
+
"end": "\"",
|
183
|
+
"endCaptures": {
|
184
|
+
"0": {
|
185
|
+
"name": "punctuation.definition.string.end.java-or-c"
|
186
|
+
}
|
187
|
+
},
|
188
|
+
"name": "string.quoted.double.java-or-c",
|
189
|
+
"patterns": [
|
190
|
+
{
|
191
|
+
"match": "\\\\.",
|
192
|
+
"name": "constant.character.escape.antlr"
|
193
|
+
}
|
194
|
+
]
|
195
|
+
},
|
196
|
+
{
|
197
|
+
"begin": "'",
|
198
|
+
"beginCaptures": {
|
199
|
+
"0": {
|
200
|
+
"name": "punctuation.definition.string.begin.java-or-c"
|
201
|
+
}
|
202
|
+
},
|
203
|
+
"end": "'",
|
204
|
+
"endCaptures": {
|
205
|
+
"0": {
|
206
|
+
"name": "punctuation.definition.string.end.java-or-c"
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"name": "string.quoted.single.java-or-c",
|
210
|
+
"patterns": [
|
211
|
+
{
|
212
|
+
"match": "\\\\.",
|
213
|
+
"name": "constant.character.escape.antlr"
|
214
|
+
}
|
215
|
+
]
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"match": "\\bEOF_CHAR\\b",
|
219
|
+
"name": "support.constant.eof-char.antlr"
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"include": "#comments"
|
223
|
+
}
|
224
|
+
]
|
225
|
+
},
|
226
|
+
"strings": {
|
227
|
+
"patterns": [
|
228
|
+
{
|
229
|
+
"begin": "\"",
|
230
|
+
"beginCaptures": {
|
231
|
+
"0": {
|
232
|
+
"name": "punctuation.definition.string.begin.antlr"
|
233
|
+
}
|
234
|
+
},
|
235
|
+
"end": "\"",
|
236
|
+
"endCaptures": {
|
237
|
+
"0": {
|
238
|
+
"name": "punctuation.definition.string.end.antlr"
|
239
|
+
}
|
240
|
+
},
|
241
|
+
"name": "string.quoted.double.antlr",
|
242
|
+
"patterns": [
|
243
|
+
{
|
244
|
+
"match": "\\\\(u\\h{4}|.)",
|
245
|
+
"name": "constant.character.escape.antlr"
|
246
|
+
}
|
247
|
+
]
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"begin": "'",
|
251
|
+
"beginCaptures": {
|
252
|
+
"0": {
|
253
|
+
"name": "punctuation.definition.string.begin.antlr"
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"end": "'",
|
257
|
+
"endCaptures": {
|
258
|
+
"0": {
|
259
|
+
"name": "punctuation.definition.string.end.antlr"
|
260
|
+
}
|
261
|
+
},
|
262
|
+
"name": "string.quoted.single.antlr",
|
263
|
+
"patterns": [
|
264
|
+
{
|
265
|
+
"match": "\\\\(u\\h{4}|.)",
|
266
|
+
"name": "constant.character.escape.antlr"
|
267
|
+
}
|
268
|
+
]
|
269
|
+
}
|
270
|
+
]
|
271
|
+
}
|
272
|
+
},
|
273
|
+
"scopeName": "source.antlr",
|
274
|
+
"uuid": "ACABDECD-4F22-47D9-A5F4-DBA957A2A1CC"
|
275
|
+
}
|