ver 2009.10.14 → 2009.11.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (318) hide show
  1. data/CHANGELOG +1094 -0
  2. data/MANIFEST +227 -25
  3. data/README.textile +185 -0
  4. data/bin/ver +96 -12
  5. data/config/detect.rb +73 -21
  6. data/config/keymap/emacs.rb +66 -0
  7. data/config/keymap/vim.rb +250 -140
  8. data/config/preferences/ANTLR.json +10 -0
  9. data/config/preferences/ASP vb.NET.json +3 -0
  10. data/config/preferences/ASP.json +15 -0
  11. data/config/preferences/ActionScript.json +755 -0
  12. data/config/preferences/Active4D.json +89 -0
  13. data/config/preferences/Ada.json +23 -0
  14. data/config/preferences/Ant.json +356 -0
  15. data/config/preferences/Apache.json +644 -0
  16. data/config/preferences/AppleScript.json +92 -0
  17. data/config/preferences/Bison.json +3 -0
  18. data/config/preferences/Blogging.json +3 -0
  19. data/config/preferences/C.json +127 -0
  20. data/config/preferences/CMake.json +41 -0
  21. data/config/preferences/CSS.json +461 -0
  22. data/config/preferences/CTags.json +3 -0
  23. data/config/preferences/CVS.json +3 -0
  24. data/config/preferences/ColdFusion.json +32 -0
  25. data/config/preferences/D.json +58 -0
  26. data/config/preferences/Darcs.json +3 -0
  27. data/config/preferences/Diff.json +67 -0
  28. data/config/preferences/DokuWiki.json +19 -0
  29. data/config/preferences/Doxygen.json +3 -0
  30. data/config/preferences/Dylan.json +3 -0
  31. data/config/preferences/Eiffel.json +59 -0
  32. data/config/preferences/Erlang.json +72 -0
  33. data/config/preferences/Experimental.json +1356 -0
  34. data/config/preferences/F-Script.json +87 -0
  35. data/config/preferences/FXScript.json +78 -0
  36. data/config/preferences/FileMerge.json +3 -0
  37. data/config/preferences/Fortran.json +158 -0
  38. data/config/preferences/GTD2.json +11 -0
  39. data/config/preferences/GTDAlt.json +20 -0
  40. data/config/preferences/GetBundle.json +3 -0
  41. data/config/preferences/Gettext.json +24 -0
  42. data/config/preferences/Graphviz.json +42 -0
  43. data/config/preferences/Greasemonkey.json +3 -0
  44. data/config/preferences/Gri.json +34 -0
  45. data/config/preferences/HTML.json +492 -0
  46. data/config/preferences/Haskell.json +72 -0
  47. data/config/preferences/Hotkey.json +3 -0
  48. data/config/preferences/ImageBrowser.json +3 -0
  49. data/config/preferences/Inform.json +3 -0
  50. data/config/preferences/Ini.json +60 -0
  51. data/config/preferences/Installer.json +3 -0
  52. data/config/preferences/Io.json +64 -0
  53. data/config/preferences/JSON.json +3 -0
  54. data/config/preferences/Java.json +86 -0
  55. data/config/preferences/JavaDoc.json +3 -0
  56. data/config/preferences/JavaScript.json +76 -0
  57. data/config/preferences/LaTeX.json +267 -0
  58. data/config/preferences/Lex/Flex.json +3 -0
  59. data/config/preferences/Lighttpd.json +3 -0
  60. data/config/preferences/LilyPond.json +77 -0
  61. data/config/preferences/Lisp.json +63 -0
  62. data/config/preferences/Logo.json +58 -0
  63. data/config/preferences/Logtalk.json +236 -0
  64. data/config/preferences/Lua.json +24 -0
  65. data/config/preferences/MEL.json +19 -0
  66. data/config/preferences/MIPS Assembler.json +26 -0
  67. data/config/preferences/MacPorts.json +3 -0
  68. data/config/preferences/Mail.json +3 -0
  69. data/config/preferences/Make.json +16 -0
  70. data/config/preferences/Markdown.json +102 -0
  71. data/config/preferences/Math.json +3 -0
  72. data/config/preferences/Matlab.json +128 -0
  73. data/config/preferences/Maven.json +308 -0
  74. data/config/preferences/Mediawiki.json +73 -0
  75. data/config/preferences/Mercurial.json +3 -0
  76. data/config/preferences/Modula.json +37 -0
  77. data/config/preferences/MoinMoin.json +52 -0
  78. data/config/preferences/Navigation.json +3 -0
  79. data/config/preferences/Nemerle.json +3 -0
  80. data/config/preferences/OCaml Code Completion.json +3 -0
  81. data/config/preferences/OCaml.json +163 -0
  82. data/config/preferences/ODCompletion.json +3 -0
  83. data/config/preferences/Objective-C.json +84 -0
  84. data/config/preferences/OpenGL.json +3331 -0
  85. data/config/preferences/Outlines.json +3 -0
  86. data/config/preferences/Pascal.json +60 -0
  87. data/config/preferences/Perforce.json +3 -0
  88. data/config/preferences/Perl.json +15 -0
  89. data/config/preferences/PmWiki.json +27 -0
  90. data/config/preferences/Postscript.json +15 -0
  91. data/config/preferences/Processing.json +32 -0
  92. data/config/preferences/Prolog.json +3 -0
  93. data/config/preferences/Propel.json +3 -0
  94. data/config/preferences/Python.json +38 -0
  95. data/config/preferences/Quake.json +15 -0
  96. data/config/preferences/R.json +33 -0
  97. data/config/preferences/Ragel.json +15 -0
  98. data/config/preferences/Regular Expressions.json +3 -0
  99. data/config/preferences/Remind.json +15 -0
  100. data/config/preferences/Rez.json +46 -0
  101. data/config/preferences/Ruby.json +98 -0
  102. data/config/preferences/S5 Slide Show.json +20 -0
  103. data/config/preferences/SCons.json +3 -0
  104. data/config/preferences/SQL.json +32 -0
  105. data/config/preferences/SSH Config.json +15 -0
  106. data/config/preferences/SVK.json +3 -0
  107. data/config/preferences/SWIG.json +3 -0
  108. data/config/preferences/SWeave.json +32 -0
  109. data/config/preferences/Scheme.json +35 -0
  110. data/config/preferences/Scilab.json +15 -0
  111. data/config/preferences/Setext.json +3 -0
  112. data/config/preferences/Shell Script.json +25 -0
  113. data/config/preferences/Slate.json +113 -0
  114. data/config/preferences/Source.json +132 -0
  115. data/config/preferences/Subversion.json +10 -0
  116. data/config/preferences/TODO.json +3 -0
  117. data/config/preferences/Tabular.json +3 -0
  118. data/config/preferences/Tcl.json +82 -0
  119. data/config/preferences/TerminalMate.json +112 -0
  120. data/config/preferences/Text.json +89 -0
  121. data/config/preferences/TextMate.json +38 -0
  122. data/config/preferences/Textile.json +76 -0
  123. data/config/preferences/Thrift.json +56 -0
  124. data/config/preferences/Transmit.json +3 -0
  125. data/config/preferences/Twiki.json +51 -0
  126. data/config/preferences/Txt2tags.json +81 -0
  127. data/config/preferences/Vectorscript.json +1280 -0
  128. data/config/preferences/XML.json +60 -0
  129. data/config/preferences/Xcode.json +3 -0
  130. data/config/preferences/YAML.json +24 -0
  131. data/config/preferences/iCalendar.json +10 -0
  132. data/config/preferences/iTerm.json +36 -0
  133. data/config/preferences/reStructuredText.json +48 -0
  134. data/config/rc.rb +49 -0
  135. data/config/syntax/ANTLR.json +5 -5
  136. data/config/syntax/{ASP VB.net.json → ASP vb.NET.json } +3 -3
  137. data/config/syntax/ASP.json +1 -1
  138. data/config/syntax/ActionScript.json +6 -6
  139. data/config/syntax/Active4D Config.json +86 -0
  140. data/config/syntax/Active4D Library.json +20 -0
  141. data/config/syntax/Active4D.json +418 -0
  142. data/config/syntax/Ada.json +3 -3
  143. data/config/syntax/Ant.json +196 -0
  144. data/config/syntax/Apache.json +7 -7
  145. data/config/syntax/AppleScript.json +3 -3
  146. data/config/syntax/{Bibtex.json → BibTeX.json} +1 -1
  147. data/config/syntax/Bison.json +59 -0
  148. data/config/syntax/{Blog (HTML).json → Blog - HTML.json } +2 -2
  149. data/config/syntax/{Blog (Markdown).json → Blog - Markdown.json } +2 -2
  150. data/config/syntax/Blog (Text).json b/data/config/syntax/Blog - → Text.json +0 -0
  151. data/config/syntax/Blog (Textile).json b/data/config/syntax/Blog - → Textile.json +0 -0
  152. data/config/syntax/C++.json +3 -3
  153. data/config/syntax/C.json +13 -13
  154. data/config/syntax/CMake Listfile.json +171 -0
  155. data/config/syntax/CSS.json +6 -6
  156. data/config/syntax/CSV.json +108 -0
  157. data/config/syntax/ColdFusion.json +204 -0
  158. data/config/syntax/D.json +560 -0
  159. data/config/syntax/Diff.json +1 -1
  160. data/config/syntax/DokuWiki.json +412 -0
  161. data/config/syntax/Doxygen.json +80 -0
  162. data/config/syntax/Dylan.json +4 -4
  163. data/config/syntax/Erlang.json +5 -5
  164. data/config/syntax/F-Script.json +1 -1
  165. data/config/syntax/FXScript.json +5 -5
  166. data/config/syntax/Fortran - Modern.json +221 -0
  167. data/config/syntax/Fortran - Punchcard.json +468 -0
  168. data/config/syntax/GTD.json +39 -0
  169. data/config/syntax/GTDalt.json +233 -0
  170. data/config/syntax/Gettext.json +118 -0
  171. data/config/syntax/Go.json +555 -0
  172. data/config/syntax/{DOT.json → Graphviz (DOT).json } +3 -3
  173. data/config/syntax/Greasemonkey.json +56 -0
  174. data/config/syntax/Gri.json +4 -4
  175. data/config/syntax/{HTML-ASP.json → HTML (ASP).json } +1 -1
  176. data/config/syntax/{HTML for ASP.net.json → HTML (ASP.net).json } +19 -19
  177. data/config/syntax/HTML (Active4D).json +540 -0
  178. data/config/syntax/HTML (Erlang).json +31 -0
  179. data/config/syntax/HTML (Tcl).json +1 -1
  180. data/config/syntax/HTML.json +20 -20
  181. data/config/syntax/Haskell.json +3 -3
  182. data/config/syntax/Installer Distribution Script.json +135 -0
  183. data/config/syntax/Io.json +6 -6
  184. data/config/syntax/JSON.json +151 -0
  185. data/config/syntax/{JavaProperties.json → Java Properties.json } +2 -2
  186. data/config/syntax/Java Server Page (JSP).json +163 -0
  187. data/config/syntax/Java.json +7 -7
  188. data/config/syntax/JavaDoc.json +435 -0
  189. data/config/syntax/JavaScript.json +8 -8
  190. data/config/syntax/LaTeX Log.json +3 -3
  191. data/config/syntax/LaTeX Memoir.json +101 -0
  192. data/config/syntax/LaTeX.json +2 -2
  193. data/config/syntax/Lex-Flex.json +396 -0
  194. data/config/syntax/LilyPond.json +608 -0
  195. data/config/syntax/Logo.json +48 -0
  196. data/config/syntax/Logtalk.json +6 -6
  197. data/config/syntax/Lua.json +1 -1
  198. data/config/syntax/{M.json → MATLAB.json} +3 -3
  199. data/config/syntax/MEL.json +7 -7
  200. data/config/syntax/MIPS.json b/data/config/syntax/MIPS → Assembler.json +0 -0
  201. data/config/syntax/MacPorts Portfile.json +298 -0
  202. data/config/syntax/Mail.json +1 -1
  203. data/config/syntax/Markdown.json +6 -6
  204. data/config/syntax/Maven POM.json +774 -0
  205. data/config/syntax/Mediawiki.json +736 -0
  206. data/config/syntax/MoinMoin.json +335 -0
  207. data/config/syntax/MultiMarkdown.json +41 -0
  208. data/config/syntax/Nemerle.json +128 -0
  209. data/config/syntax/OCaml.json +4 -4
  210. data/config/syntax/OCamllex.json +307 -0
  211. data/config/syntax/OCamlyacc.json +346 -0
  212. data/config/syntax/Objective-C++.json +2 -2
  213. data/config/syntax/Objective-C.json +979 -0
  214. data/config/syntax/Octave.json +417 -0
  215. data/config/syntax/PHP.json +32 -32
  216. data/config/syntax/Pascal.json +1 -1
  217. data/config/syntax/Perl.json +8 -8
  218. data/config/syntax/{Plain text.json → Plain Text.json } +1 -1
  219. data/config/syntax/PmWiki.json +241 -0
  220. data/config/syntax/Postscript.json +206 -0
  221. data/config/syntax/Processing.json +8 -8
  222. data/config/syntax/Prolog.json +70 -0
  223. data/config/syntax/Python.json +1934 -0
  224. data/config/syntax/{Quake3 Config.json → Quake Style .cfg.json } +1 -1
  225. data/config/syntax/R.json +2 -2
  226. data/config/syntax/Ragel.json +362 -0
  227. data/config/syntax/Rd (R Documentation).json +119 -0
  228. data/config/syntax/Regular Expressions (Oniguruma).json +186 -0
  229. data/config/syntax/Regular Expressions (Python).json +188 -0
  230. data/config/syntax/Release Notes.json +78 -0
  231. data/config/syntax/Remind.json +461 -0
  232. data/config/syntax/Rez.json +5 -5
  233. data/config/syntax/Ruby Sass.json +497 -0
  234. data/config/syntax/Ruby.json +13 -13
  235. data/config/syntax/S5 Slide Show.json +85 -0
  236. data/config/syntax/SQL.json +11 -11
  237. data/config/syntax/SSH Config.json +55 -0
  238. data/config/syntax/SWIG.json +2 -2
  239. data/config/syntax/SWeave.json +139 -0
  240. data/config/syntax/Scheme.json +8 -8
  241. data/config/syntax/Scilab.json +69 -0
  242. data/config/syntax/Setext.json +247 -0
  243. data/config/syntax/{Shell-Unix-Generic.json → Shell Script (Bash).json } +4 -4
  244. data/config/syntax/Slate.json +5 -5
  245. data/config/syntax/Strings File.json +53 -0
  246. data/config/syntax/TSV.json +83 -0
  247. data/config/syntax/Tcl.json +1 -1
  248. data/config/syntax/TeX Math.json +2 -2
  249. data/config/syntax/TeX.json +2 -2
  250. data/config/syntax/Textile.json +9 -9
  251. data/config/syntax/Thrift.json +641 -0
  252. data/config/syntax/Twiki.json +1 -1
  253. data/config/syntax/Txt2tags.json +154 -0
  254. data/config/syntax/XML strict.json +4 -4
  255. data/config/syntax/XML.json +6 -6
  256. data/config/syntax/XSL.json +2 -2
  257. data/config/syntax/camlp4.json +63 -0
  258. data/config/syntax/mod_perl.json +72 -0
  259. data/config/syntax/reStructuredText.json +1 -1
  260. data/config/syntax/{Subversion commit message.json → svn-commit.tmp.json} +0 -0
  261. data/config/tutorial +23 -19
  262. data/config/welcome +3 -3
  263. data/lib/ver.rb +273 -62
  264. data/lib/ver/entry.rb +142 -26
  265. data/lib/ver/font.rb +51 -0
  266. data/lib/ver/help.rb +16 -0
  267. data/lib/ver/help/describe_key.rb +82 -0
  268. data/lib/ver/help/help_for_help.rb +39 -0
  269. data/lib/ver/hover_completion.rb +129 -0
  270. data/lib/ver/keymap.rb +95 -24
  271. data/lib/ver/layout.rb +107 -43
  272. data/lib/ver/methods.rb +24 -8
  273. data/lib/ver/methods/clipboard.rb +91 -0
  274. data/lib/ver/methods/completion.rb +146 -71
  275. data/lib/ver/methods/control.rb +203 -222
  276. data/lib/ver/methods/ctags.rb +55 -0
  277. data/lib/ver/methods/delete.rb +30 -0
  278. data/lib/ver/methods/help.rb +7 -0
  279. data/lib/ver/methods/insert.rb +233 -1
  280. data/lib/ver/methods/move.rb +181 -32
  281. data/lib/ver/methods/open.rb +208 -0
  282. data/lib/ver/methods/preview.rb +14 -0
  283. data/lib/ver/methods/save.rb +111 -0
  284. data/lib/ver/methods/search.rb +57 -7
  285. data/lib/ver/methods/select.rb +97 -17
  286. data/lib/ver/methods/shortcuts.rb +21 -0
  287. data/lib/ver/methods/views.rb +56 -1
  288. data/lib/ver/mode.rb +60 -14
  289. data/lib/ver/status.rb +97 -19
  290. data/lib/ver/syntax.rb +14 -6
  291. data/lib/ver/syntax/detector.rb +16 -5
  292. data/lib/ver/syntax/processor.rb +9 -3
  293. data/lib/ver/text.rb +258 -199
  294. data/lib/ver/text/index.rb +103 -0
  295. data/lib/ver/theme.rb +27 -16
  296. data/lib/ver/tooltip.rb +59 -0
  297. data/lib/ver/vendor/binary_search.rb +61 -0
  298. data/lib/ver/vendor/levenshtein.rb +57 -0
  299. data/lib/ver/{textpow.rb → vendor/textpow.rb} +31 -29
  300. data/lib/ver/view.rb +65 -41
  301. data/lib/ver/view/console.rb +171 -0
  302. data/lib/ver/view/entry.rb +9 -5
  303. data/lib/ver/view/list.rb +44 -29
  304. data/lib/ver/view/list/ex.rb +71 -0
  305. data/lib/ver/view/list/grep.rb +42 -0
  306. data/lib/ver/view/list/methods.rb +159 -0
  307. data/lib/ver/view/term.rb +249 -0
  308. data/tasks/syntax_list.rake +3 -2
  309. data/ver.gemspec +4 -4
  310. metadata +230 -28
  311. data/config/syntax/Bulletin Board.json +0 -428
  312. data/config/syntax/HTML (Mason).json +0 -207
  313. data/config/syntax/HTML (Rails).json +0 -52
  314. data/config/syntax/Movable Type.json +0 -348
  315. data/config/syntax/Ruby on Rails.json +0 -170
  316. data/config/syntax/SQL (Rails).json +0 -31
  317. data/config/syntax/Smarty.json +0 -110
  318. data/config/syntax/Standard ML.json +0 -322
@@ -0,0 +1,736 @@
1
+ {
2
+ "comment": "\n\t\tThis language grammar tries to handle Mediawiki syntax. Mediawiki\n\t\tsyntax is a mess. This grammar will likely never quite work right.\n\t\tThis is unsurprising as Mediawiki itself has never quite worked right.\n\t\t\n\t\t\t\t--Jacob\n\t\t\n\t\tTODO: lots of fixes still to do:\n\t\t\n\t\t 1. Add a bunch of HTML tags. See the #block and #style sections.\n\t\t 3. Correctly scope all the parser functions and their contents.\n\t\t This on will be complicated, as there are several: expr, if, etc.\n\t\t 4. This is probably the biggest one: get all the lists to scope\n\t\t correctly by type of list. Right now we just scope every list\n\t\t as a list, and do not worry about what happens beyond that.\n\t\t Eventually we want to do numbered and unnumbered separately, etc.\n\t\t 5. Get some kind of folding by heading. Maybe it should just fold\n\t\t to the next header, no matter which level it is. Then we can\n\t\t make a contents just by folding everything. Not completely sure\n\t\t\tthis is possible with current TM folding.\n\t\t 7. Make sure that illegal things are correctly scoped illegal.\n\t\t This is non-trivial, and has several parts\n\t\t \n\t\t - Bold/italic are based on brain-dead heuristics. I want to\n\t\t be stricter than Mediawiki on this one. Also, we should\n\t\t scope as illegal when for instance a new heading starts\n\t\t before an italic has been closed.\n\t\t - Templates... these will be pretty tough to do, as they can\n\t\t be so flexible.\n\t\t - \n\t\t\n\t\t 9. <timeline></timeline> tag. I am really not sure this one is\n\t\t worth trying to do\n\t\t10. Figure out a better scope for meta.function-call. Infininight\n\t\t suggests entity.name.function.call, to be paralleled by\n\t\t entity.name.function.definition. I am not completly sure I like\n\t\t that solution, but it is probably better than meta.function-call\n\t\t\n\t\t\n\t\tTODO items not closely related to the grammar:\n\t\t\n\t\t 2. Add a drop command for links/images, add keyboard shortcuts for\n\t\t them too\n\t\t 3. Make sure all the preference items are sorted out, for instance\n\t\t smart typing pairs, indent patterns, etc.\n\t\t 4. Commands to do bold/italic, and maybe things like big/small \n\t\t 5. \n\t\t\n\t\tFINISHED:\n\t\t 2. Add support for LaTeX math mode inside of <math></math> tags.\n\t\t 1. Add a command for new list item. This one is trivial\n\t\t 6. Get the symbol list working on headings. Trivial.\n\t\t 8. <gallery></gallery> tag. This one adds some complication, but\n\t\t is worth supporting.\n\t\t \n\t",
3
+ "fileTypes": [
4
+ "mediawiki",
5
+ "wikipedia",
6
+ "wiki"
7
+ ],
8
+ "foldingStartMarker": "^(=+)",
9
+ "foldingStopMarker": "^.*$(?=\\n(=+)|(?!\\n))",
10
+ "keyEquivalent": "^~M",
11
+ "name": "Mediawiki",
12
+ "patterns": [
13
+ {
14
+ "include": "#block"
15
+ },
16
+ {
17
+ "include": "#inline"
18
+ }
19
+ ],
20
+ "repository": {
21
+ "block": {
22
+ "patterns": [
23
+ {
24
+ "begin": "^\\s*(?i)(#redirect)",
25
+ "beginCaptures": {
26
+ "1": {
27
+ "name": "keyword.control.redirect.mediawiki"
28
+ }
29
+ },
30
+ "end": "\\n",
31
+ "name": "meta.redirect.mediawiki",
32
+ "patterns": [
33
+ {
34
+ "include": "#link"
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "match": "^=+\\s*$",
40
+ "name": "markup.heading.mediawiki"
41
+ },
42
+ {
43
+ "begin": "^(=+)(?=.*\\1\\s*$)",
44
+ "comment": "\n\t\t\t\t\t\tThis matches lines which begin and end with some\n\t\t\t\t\t number of \u201c=\u201d marks. If they are mismatched, then\n\t\t\t\t\t interior \u201c=\u201d marks will be treated as invalid.\n\t\t\t\t ",
45
+ "end": "\\1\\s*$\\n?",
46
+ "name": "markup.heading.mediawiki",
47
+ "patterns": [
48
+ {
49
+ "match": "(?<=^=|^==|^===|^====|^=====|^======)=+|=(?==*\\s*$)",
50
+ "name": "invalid.illegal.extra-equals-sign.mediawiki"
51
+ },
52
+ {
53
+ "include": "#inline"
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "comment": "\n\t\t\t\t\t\tA separator is made up of 4 or more -s alone on a\n\t\t\t\t\t\tline by themselves.\n\t\t\t\t\t",
59
+ "match": "^-{4,}[ \\t]*($\\n)?",
60
+ "name": "meta.separator.mediawiki"
61
+ },
62
+ {
63
+ "begin": "^ (?=\\s*\\S)",
64
+ "comment": "\n\t\t\t\t\t\tCode blocks start with one space. Wiki text and\n\t\t\t\t\t\thtml are still interpreted in MediaWiki, unlike in\n\t\t\t\t\t\tmediawiki.\n\t\t\t\t\t",
65
+ "end": "^(?=[^ ])",
66
+ "name": "markup.raw.block.mediawiki",
67
+ "patterns": [
68
+ {
69
+ "include": "#inline"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "begin": "^([#*:;])",
75
+ "comment": "\n\t\t\t\t\t\tThis is preliminary. Eventually it would be nice\n\t\t\t\t\t\tto scope each type of list differently, and even to\n\t\t\t\t\t\tdo scopes of nested lists. There are 4 main things\n\t\t\t\t\t\twhich will be scoped as lists:\n\t\t\t\t\t\t\n\t\t\t\t\t\t - numbered lists (#)\n\t\t\t\t\t\t - unnumbered lists (*)\n\t\t\t\t\t\t - definition lists (; :)\n\t\t\t\t\t\t - indented paragraphs, as used on talk pages (:)\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis last one might not even be scoped as a list in\n\t\t\t\t\t\tthe ideal case. It is fine as a list for now,\n\t\t\t\t\t\thowever.\n\t\t\t\t\t",
76
+ "end": "^(?!\\1)",
77
+ "name": "markup.list.mediawiki",
78
+ "patterns": [
79
+ {
80
+ "include": "#inline"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "include": "#table"
86
+ },
87
+ {
88
+ "include": "#comments"
89
+ },
90
+ {
91
+ "begin": "^(?![\\t ;*#:=]|----|$)",
92
+ "comment": "\n\t\t\t\t\t\tAnything that is not a code block, list, header, etc.\n\t\t\t\t\t\tis a paragraph.\n\t\t\t\t\t",
93
+ "end": "^(?:\\s*$|(?=[;*#:=]|----))",
94
+ "name": "meta.paragraph.mediawiki",
95
+ "patterns": [
96
+ {
97
+ "include": "#inline"
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ },
103
+ "block_html": {
104
+ "comment": "\n\t\t\t\tThe available block HTML tags supported are:\n\t\t\t\t\n\t\t\t\t * blockquote, center, pre, div, hr, p\n\t\t\t\t * tables: table, th, tr, td, caption\n\t\t\t\t * lists: ul, ol, li\n\t\t\t\t * definition lists: dl, dt, dd\n\t\t\t\t * headers: h1, h2, h3, h4, h5, h6\n\t\t\t\t * br\n\t\t\t",
105
+ "patterns": [
106
+ {
107
+ "begin": "(<math>)",
108
+ "captures": {
109
+ "1": {
110
+ "name": "meta.tag.inline.math.mediawiki"
111
+ }
112
+ },
113
+ "contentName": "source.math.tex.embedded.mediawiki",
114
+ "end": "(</math>)",
115
+ "patterns": [
116
+ {
117
+ "include": "text.tex.math"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "begin": "(<ref>)",
123
+ "captures": {
124
+ "1": {
125
+ "name": "meta.tag.inline.ref.mediawiki"
126
+ }
127
+ },
128
+ "contentName": "meta.reference.content.mediawiki",
129
+ "end": "(</ref>)",
130
+ "patterns": [
131
+ {
132
+ "include": "#inline"
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ "begin": "(<gallery>)",
138
+ "captures": {
139
+ "1": {
140
+ "name": "meta.tag.inline.ref.mediawiki"
141
+ }
142
+ },
143
+ "contentName": "meta.gallery.mediawiki",
144
+ "end": "(</gallery>)",
145
+ "patterns": [
146
+ {
147
+ "begin": "(?x)\n\t\t\t\t\t\t\t\t^(?!\\s*\\n)\t\t\t\t# not an empty line\n\t\t\t\t\t\t\t\t( [ ]*(((i|I)mage)(:)) # spaces, image, colon\n\t\t\t\t\t\t\t\t ([^\\[\\]|]+) # anything\n\t\t\t\t\t\t\t\t (?<!\\s)[ ]* # spaces\n\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t",
148
+ "beginCaptures": {
149
+ "3": {
150
+ "name": "constant.other.namespace.image.mediawiki"
151
+ },
152
+ "5": {
153
+ "name": "punctuation.fix_this_later.colon.mediawiki"
154
+ },
155
+ "6": {
156
+ "name": "constant.other.wiki-link.image.mediawiki"
157
+ }
158
+ },
159
+ "end": "\\n",
160
+ "name": "meta.item.gallery.mediawiki",
161
+ "patterns": [
162
+ {
163
+ "begin": "^(?!\\|)|(\\|)",
164
+ "beginCaptures": {
165
+ "1": {
166
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
167
+ }
168
+ },
169
+ "contentName": "string.other.title.gallery.mediawiki",
170
+ "end": "\\n|(?=\\|)",
171
+ "patterns": [
172
+ {
173
+ "include": "#inline"
174
+ }
175
+ ]
176
+ },
177
+ {
178
+ "match": "\\|",
179
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
180
+ }
181
+ ]
182
+ }
183
+ ]
184
+ }
185
+ ]
186
+ },
187
+ "comments": {
188
+ "patterns": [
189
+ {
190
+ "begin": "<!--",
191
+ "end": "--\\s*>",
192
+ "name": "comment.block.html.mediawiki",
193
+ "patterns": [
194
+ {
195
+ "match": "--",
196
+ "name": "invalid.illegal.bad-comments-or-CDATA.html.mediawiki"
197
+ }
198
+ ]
199
+ }
200
+ ]
201
+ },
202
+ "entities": {
203
+ "comment": "\n\t\t\t\tMediawiki supports Unicode, so these should not usually be\n\t\t\t\tnecessary, but they do show up on pages from time to time.\n\t\t\t",
204
+ "patterns": [
205
+ {
206
+ "match": "&([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);",
207
+ "name": "constant.character.entity.html.mediawiki"
208
+ },
209
+ {
210
+ "match": "&",
211
+ "name": "invalid.illegal.bad-ampersand.html.mediawiki"
212
+ }
213
+ ]
214
+ },
215
+ "inline": {
216
+ "patterns": [
217
+ {
218
+ "captures": {
219
+ "1": {
220
+ "name": "constant.other.date-time.mediawiki"
221
+ },
222
+ "2": {
223
+ "name": "invalid.illegal.too-many-tildes.mediawiki"
224
+ }
225
+ },
226
+ "match": "(~~~~~)(~{0,2})(?!~)"
227
+ },
228
+ {
229
+ "comment": "3 ~s for sig, 4 for sig + timestamp",
230
+ "match": "~~~~?",
231
+ "name": "constant.other.signature.mediawiki"
232
+ },
233
+ {
234
+ "include": "#link"
235
+ },
236
+ {
237
+ "include": "#style"
238
+ },
239
+ {
240
+ "include": "#template"
241
+ },
242
+ {
243
+ "include": "#block_html"
244
+ },
245
+ {
246
+ "include": "#comments"
247
+ }
248
+ ]
249
+ },
250
+ "link": {
251
+ "patterns": [
252
+ {
253
+ "applyEndPatternLast": 1,
254
+ "begin": "(?x:\n\t\t\t\t\t\t(\\[\\[) # opening brackets\n\t\t\t\t\t\t ( [ ]*(((i|I)mage)(:)) # spaces, image, colon\n\t\t\t\t\t\t ([^\\[\\]|]+) # anything\n\t\t\t\t\t\t (?<!\\s)[ ]* # spaces\n\t\t\t\t\t\t )\n\t\t\t\t\t)",
255
+ "beginCaptures": {
256
+ "1": {
257
+ "name": "punctuation.fix_this_later.brackets.mediwiki"
258
+ },
259
+ "4": {
260
+ "name": "constant.other.namespace.image.mediawiki"
261
+ },
262
+ "6": {
263
+ "name": "punctuation.fix_this_later.colon.mediawiki"
264
+ },
265
+ "7": {
266
+ "name": "constant.other.wiki-link.image.mediawiki"
267
+ }
268
+ },
269
+ "end": "(?x:\n\t\t\t\t\t\t ((\\|)[ ]*( [^\\[\\]|]+ )[ ]*)? # pipe, spaces, anything, spaces\n\t\t\t\t\t\t(\\]\\]) # closing brackets\n\t\t\t\t\t)",
270
+ "endCaptures": {
271
+ "2": {
272
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
273
+ },
274
+ "3": {
275
+ "name": "string.other.title.link.wiki-link.mediawiki"
276
+ }
277
+ },
278
+ "name": "meta.image.wiki.mediawiki",
279
+ "patterns": [
280
+ {
281
+ "captures": {
282
+ "1": {
283
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
284
+ },
285
+ "2": {
286
+ "name": "keyword.control.image.formatting.mediawiki"
287
+ },
288
+ "3": {
289
+ "name": "keyword.control.image.alignment.mediawiki"
290
+ },
291
+ "4": {
292
+ "name": "constant.numeric.image.width.mediawiki"
293
+ },
294
+ "5": {
295
+ "name": "constant.other.unit.mediawiki"
296
+ }
297
+ },
298
+ "match": "(?x)\n\t\t\t\t\t\t\t\t(\\|)[ ]*\n\t\t\t\t\t\t\t\t( (thumb|thumbnail|frame)\n\t\t\t\t\t\t\t\t |(right|left|center|none)\n\t\t\t\t\t\t\t\t |([0-9]+)(px)\n\t\t\t\t\t\t\t\t)[ ]*\n\t\t\t\t\t\t\t"
299
+ },
300
+ {
301
+ "match": "\\|",
302
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
303
+ },
304
+ {
305
+ "include": "#style_in_link"
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ "begin": "(?x:\n\t\t\t\t\t\t(\\[\\[) # opening brackets\n\t\t\t\t\t\t (:)? # colon to suppress image or category?\n\t\t\t\t\t\t ((\\s+):[^\\[\\]]*(?=\\]\\]))? # a colon after spaces is invalid\n\t\t\t\t\t\t [ ]* # spaces\n\t\t\t\t\t\t ( (([^\\[\\]|]+)(:))? # namespace\n\t\t\t\t\t\t ([^\\[\\]|]+)(?<!\\s)[ ]* # link name\n\t\t\t\t\t\t )?\n\t\t\t\t\t)",
311
+ "beginCaptures": {
312
+ "1": {
313
+ "name": "punctuation.fix_this_later.brackets.mediawiki"
314
+ },
315
+ "2": {
316
+ "name": "keyword.operator.wiki-link.suppress-image-or-category.mediawiki"
317
+ },
318
+ "4": {
319
+ "name": "invalid.illegal.whitespace.mediawiki"
320
+ },
321
+ "7": {
322
+ "name": "constant.other.namespace.mediawiki"
323
+ },
324
+ "8": {
325
+ "name": "punctuation.fix_this_later.colon.mediawiki"
326
+ },
327
+ "9": {
328
+ "name": "constant.other.wiki-link.mediawiki"
329
+ }
330
+ },
331
+ "end": "(?x:\n\t\t\t\t\t\t (\\|[ ]*([^\\[\\]|]+)[ ]*)? # pipe, spaces, anything, spaces\n\t\t\t\t\t\t(\\]\\]) # closing brackets\n\t\t\t\t\t)",
332
+ "endCaptures": {
333
+ "2": {
334
+ "name": "string.other.title.link.wiki-link.mediawiki"
335
+ }
336
+ },
337
+ "name": "meta.link.wiki.mediawiki",
338
+ "patterns": [
339
+ {
340
+ "include": "#style_in_link"
341
+ }
342
+ ]
343
+ },
344
+ {
345
+ "begin": "\\[(\\S+)\\s*(?=[^\\]]*\\])",
346
+ "beginCaptures": {
347
+ "1": {
348
+ "name": "markup.underline.link.external.mediawiki"
349
+ }
350
+ },
351
+ "contentName": "string.other.title.link.external.mediawiki",
352
+ "end": "\\]",
353
+ "name": "meta.link.inline.external.mediawiki",
354
+ "patterns": [
355
+ {
356
+ "include": "#style_in_link"
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "match": "((https?|ftp|file)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])",
362
+ "name": "markup.underline.link.external.mediawiki"
363
+ }
364
+ ]
365
+ },
366
+ "style": {
367
+ "comment": "\n\t\t\t\tTODO: We still need to add:\n\n\t\t\t\t * font\n\t\t\t\t * ruby, rb, rp, rt\n\t\t\t\t * cite\n\t\t\t\t\n\t\t\t\tinline tags to this section, and make sure that the other\n\t\t\t\ttags can accept attributes in the tag opening, etc. The\n\t\t\t\tcurrent implementation is intended to be naive, but covering\n\t\t\t\tthe majority of uses in mediawiki code.\n\t\t\t\t\n\t\t\t\tWe also need to add mediawiki-specific tags:\n\t\t\t\t\n\t\t\t\t * nowiki, noinclude, includeonly\n\t\t\t\t\n\t\t\t",
368
+ "patterns": [
369
+ {
370
+ "begin": "'''",
371
+ "end": "'''",
372
+ "name": "markup.bold.mediawiki",
373
+ "patterns": [
374
+ {
375
+ "include": "#inline"
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "begin": "''",
381
+ "end": "''(?!'[^'])",
382
+ "name": "markup.italic.mediawiki",
383
+ "patterns": [
384
+ {
385
+ "include": "#inline"
386
+ }
387
+ ]
388
+ },
389
+ {
390
+ "begin": "(<(b|strong)>)",
391
+ "captures": {
392
+ "1": {
393
+ "name": "meta.tag.inline.bold.html.mediawiki"
394
+ }
395
+ },
396
+ "contentName": "markup.bold.html.mediawiki",
397
+ "end": "(</\\2>)",
398
+ "patterns": [
399
+ {
400
+ "include": "#inline"
401
+ }
402
+ ]
403
+ },
404
+ {
405
+ "begin": "(<(i|em)>)",
406
+ "captures": {
407
+ "1": {
408
+ "name": "meta.tag.inline.italic.html.mediawiki"
409
+ }
410
+ },
411
+ "contentName": "markup.italic.html.mediawiki",
412
+ "end": "(</\\2>)",
413
+ "patterns": [
414
+ {
415
+ "include": "#inline"
416
+ }
417
+ ]
418
+ },
419
+ {
420
+ "begin": "(<(s|strike)>)",
421
+ "captures": {
422
+ "1": {
423
+ "name": "meta.tag.inline.strikethrough.html.mediawiki"
424
+ }
425
+ },
426
+ "contentName": "markup.other.strikethrough.html.mediawiki",
427
+ "end": "(</\\2>)",
428
+ "patterns": [
429
+ {
430
+ "include": "#inline"
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "begin": "(<(u)>)",
436
+ "captures": {
437
+ "1": {
438
+ "name": "meta.tag.inline.underline.html.mediawiki"
439
+ }
440
+ },
441
+ "contentName": "markup.underline.html.mediawiki",
442
+ "end": "(</\\2>)",
443
+ "patterns": [
444
+ {
445
+ "include": "#inline"
446
+ }
447
+ ]
448
+ },
449
+ {
450
+ "begin": "(<(tt|code)>)",
451
+ "captures": {
452
+ "1": {
453
+ "name": "meta.tag.inline.raw.html.mediawiki"
454
+ }
455
+ },
456
+ "contentName": "markup.raw.html.mediawiki",
457
+ "end": "(</\\2>)",
458
+ "patterns": [
459
+ {
460
+ "include": "#inline"
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "begin": "(<(big|small|sub|sup)>)",
466
+ "captures": {
467
+ "1": {
468
+ "name": "meta.tag.inline.any.html.mediawiki"
469
+ }
470
+ },
471
+ "contentName": "markup.other.inline-styles.html.mediawiki",
472
+ "end": "(</\\2>)",
473
+ "patterns": [
474
+ {
475
+ "include": "#inline"
476
+ }
477
+ ]
478
+ }
479
+ ]
480
+ },
481
+ "style_in_link": {
482
+ "patterns": [
483
+ {
484
+ "begin": "'''",
485
+ "end": "'''",
486
+ "name": "markup.bold.mediawiki",
487
+ "patterns": [
488
+ {
489
+ "include": "#style_in_link"
490
+ }
491
+ ]
492
+ },
493
+ {
494
+ "begin": "''",
495
+ "end": "''",
496
+ "name": "markup.italic.mediawiki",
497
+ "patterns": [
498
+ {
499
+ "include": "#style_in_link"
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "begin": "(<(b|strong)>)",
505
+ "captures": {
506
+ "1": {
507
+ "name": "meta.tag.inline.bold.html.mediawiki"
508
+ }
509
+ },
510
+ "contentName": "markup.bold.html.mediawiki",
511
+ "end": "(</\\2>)",
512
+ "patterns": [
513
+ {
514
+ "include": "#style_in_link"
515
+ }
516
+ ]
517
+ },
518
+ {
519
+ "begin": "(<(i|em)>)",
520
+ "captures": {
521
+ "1": {
522
+ "name": "meta.tag.inline.italic.html.mediawiki"
523
+ }
524
+ },
525
+ "contentName": "markup.italic.html.mediawiki",
526
+ "end": "(</\\2>)",
527
+ "patterns": [
528
+ {
529
+ "include": "#style_in_link"
530
+ }
531
+ ]
532
+ },
533
+ {
534
+ "begin": "(<(s|strike)>)",
535
+ "captures": {
536
+ "1": {
537
+ "name": "meta.tag.inline.strikethrough.html.mediawiki"
538
+ }
539
+ },
540
+ "contentName": "markup.other.strikethrough.html.mediawiki",
541
+ "end": "(</\\2>)",
542
+ "patterns": [
543
+ {
544
+ "include": "#style_in_link"
545
+ }
546
+ ]
547
+ },
548
+ {
549
+ "begin": "(<(u)>)",
550
+ "captures": {
551
+ "1": {
552
+ "name": "meta.tag.inline.underline.html.mediawiki"
553
+ }
554
+ },
555
+ "contentName": "markup.underline.html.mediawiki",
556
+ "end": "(</\\2>)",
557
+ "patterns": [
558
+ {
559
+ "include": "#style_in_link"
560
+ }
561
+ ]
562
+ },
563
+ {
564
+ "begin": "(<(tt|code)>)",
565
+ "captures": {
566
+ "1": {
567
+ "name": "meta.tag.inline.raw.html.mediawiki"
568
+ }
569
+ },
570
+ "contentName": "markup.raw.html.mediawiki",
571
+ "end": "(</\\2>)",
572
+ "patterns": [
573
+ {
574
+ "include": "#style_in_link"
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ "begin": "(<(big|small|sub|sup)>)",
580
+ "captures": {
581
+ "1": {
582
+ "name": "meta.tag.inline.any.html.mediawiki"
583
+ }
584
+ },
585
+ "contentName": "markup.other.inline-styles.html.mediawiki",
586
+ "end": "(</\\2>)",
587
+ "patterns": [
588
+ {
589
+ "include": "#style_in_link"
590
+ }
591
+ ]
592
+ },
593
+ {
594
+ "include": "#comments"
595
+ }
596
+ ]
597
+ },
598
+ "table": {
599
+ "patterns": [
600
+ {
601
+ "begin": "^{\\|",
602
+ "comment": "\n\t\t\t\t\t\twe are going to have to add the styling capabilities\n\t\t\t\t\t\tto this section eventually. It is complicated,\n\t\t\t\t\t\tthough, so I am putting it off.\n\t\t\t\t\t",
603
+ "end": "^\\|}",
604
+ "name": "markup.other.table.mediawiki",
605
+ "patterns": [
606
+ {
607
+ "begin": "^\\|-",
608
+ "comment": "\n\t\t\t\t\t\t\t\thopefully we can allow selection of a whole\n\t\t\t\t\t\t\t\ttable row, and possibly later allow things\n\t\t\t\t\t\t\t\tlike moving a whole row up/down, etc.\n\t\t\t\t\t\t\t",
609
+ "end": "^(?=\\|-|\\|})",
610
+ "name": "markup.other.table.row.mediawiki",
611
+ "patterns": [
612
+ {
613
+ "include": "#inline"
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ "include": "#inline"
619
+ }
620
+ ]
621
+ }
622
+ ]
623
+ },
624
+ "template": {
625
+ "comment": "\n\t\t\t\tThis repository item covers templates and parser functions.\n\t\t\t",
626
+ "patterns": [
627
+ {
628
+ "captures": {
629
+ "1": {
630
+ "name": "variable.parameter.template.numeric.mediawiki"
631
+ }
632
+ },
633
+ "match": "{{{[ ]*([0-9]+)[ ]*}}}",
634
+ "name": "meta.template-parameter.mediawiki"
635
+ },
636
+ {
637
+ "captures": {
638
+ "1": {
639
+ "name": "variable.parameter.template.named.mediawiki"
640
+ }
641
+ },
642
+ "match": "{{{[ ]*(.*?)[ ]*}}}",
643
+ "name": "meta.template-parameter.mediawiki"
644
+ },
645
+ {
646
+ "begin": "({{)(?=[ ]*#)",
647
+ "beginCaptures": {
648
+ "1": {
649
+ "name": "punctuation.fix_this_later.template.mediawiki"
650
+ },
651
+ "2": {
652
+ "name": "meta.function-call.template.mediawiki"
653
+ }
654
+ },
655
+ "comment": "\n\t\t\t\t\t\tWhy oh why did mediawiki have to add these??\n\t\t\t\t\t",
656
+ "end": "(}})",
657
+ "endCaptures": {
658
+ "1": {
659
+ "name": "punctuation.fix_this_later.template.mediawiki"
660
+ }
661
+ },
662
+ "name": "meta.template.parser-function.mediawiki",
663
+ "patterns": [
664
+ {
665
+ "include": "#inline"
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ "begin": "({{)([^{}\\|]+)?",
671
+ "beginCaptures": {
672
+ "1": {
673
+ "name": "punctuation.fix_this_later.template.mediawiki"
674
+ },
675
+ "2": {
676
+ "name": "meta.function-call.template.mediawiki"
677
+ }
678
+ },
679
+ "comment": "\n\t\t\t\t\t\tI am not sure I really like the scope of\n\t\t\t\t\t\tmeta.function-call for templates, but it seems like\n\t\t\t\t\t\tthe closest thing to what a template is really doing,\n\t\t\t\t\t\twith parameters, etc.\n\t\t\t\t\t",
680
+ "end": "(}})",
681
+ "endCaptures": {
682
+ "1": {
683
+ "name": "punctuation.fix_this_later.template.mediawiki"
684
+ }
685
+ },
686
+ "name": "meta.template.mediawiki",
687
+ "patterns": [
688
+ {
689
+ "include": "#comments"
690
+ },
691
+ {
692
+ "begin": "(\\|)\\s*(=)",
693
+ "beginCaptures": {
694
+ "1": {
695
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
696
+ },
697
+ "2": {
698
+ "name": "punctuation.fix_this_later.equals-sign.mediawiki"
699
+ }
700
+ },
701
+ "contentName": "comment.block.template-hack.mediawiki",
702
+ "end": "(?=[|}])"
703
+ },
704
+ {
705
+ "begin": "(\\|)(([^{}\\|=]+)(=))?",
706
+ "beginCaptures": {
707
+ "1": {
708
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
709
+ },
710
+ "2": {
711
+ "name": "variable.parameter.template.mediawiki"
712
+ },
713
+ "3": {
714
+ "name": "punctuation.fix_this_later.equals-sign.mediawiki"
715
+ }
716
+ },
717
+ "contentName": "meta.value.template.mediawiki",
718
+ "end": "(?=[|}])",
719
+ "patterns": [
720
+ {
721
+ "include": "#inline"
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "match": "\\|",
727
+ "name": "punctuation.fix_this_later.pipe.mediawiki"
728
+ }
729
+ ]
730
+ }
731
+ ]
732
+ }
733
+ },
734
+ "scopeName": "text.html.mediawiki",
735
+ "uuid": "6AF21ADF-316A-47D1-A8B6-1BB38637DE9A"
736
+ }