textpow 0.10.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +30 -0
  4. data/{History.txt → History.rdoc} +10 -0
  5. data/{README.txt → MIT-LICENSE.txt} +0 -30
  6. data/README.rdoc +82 -0
  7. data/Rakefile +42 -49
  8. data/bin/plist2syntax +0 -0
  9. data/bin/plist2yaml +0 -0
  10. data/examples/benchmark_js.rb +13 -0
  11. data/examples/jquery.js +9046 -0
  12. data/lib/textpow.rb +43 -3
  13. data/lib/textpow/debug_processor.rb +35 -35
  14. data/lib/textpow/recording_processor.rb +13 -0
  15. data/lib/textpow/score_manager.rb +60 -60
  16. data/lib/textpow/syntax.rb +303 -262
  17. data/lib/textpow/syntax/broken/markdown.syntax +519 -0
  18. data/lib/textpow/syntax/broken/php.syntax +1253 -0
  19. data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
  20. data/lib/textpow/syntax/old/YAML.yaml +160 -0
  21. data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
  22. data/lib/textpow/syntax/source.actionscript.syntax +97 -0
  23. data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
  24. data/lib/textpow/syntax/source.active4d.syntax +276 -0
  25. data/lib/textpow/syntax/source.ada.syntax +33 -0
  26. data/lib/textpow/syntax/source.antlr.syntax +151 -0
  27. data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
  28. data/lib/textpow/syntax/source.apache-config.syntax +191 -0
  29. data/lib/textpow/syntax/source.applescript.syntax +384 -0
  30. data/lib/textpow/syntax/source.asp.syntax +70 -0
  31. data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
  32. data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
  33. data/lib/textpow/syntax/source.c++.syntax +186 -0
  34. data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
  35. data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
  36. data/lib/textpow/syntax/source.c.syntax +414 -0
  37. data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
  38. data/lib/textpow/syntax/source.cm.syntax +32 -0
  39. data/lib/textpow/syntax/source.coffee.syntax +216 -0
  40. data/lib/textpow/syntax/source.context-free.syntax +176 -0
  41. data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
  42. data/lib/textpow/syntax/source.css.syntax +195 -0
  43. data/lib/textpow/syntax/source.d.syntax +142 -0
  44. data/lib/textpow/syntax/source.diff.syntax +81 -0
  45. data/lib/textpow/syntax/source.dot.syntax +47 -0
  46. data/lib/textpow/syntax/source.dylan.syntax +62 -0
  47. data/lib/textpow/syntax/source.eiffel.syntax +78 -0
  48. data/lib/textpow/syntax/source.erlang.syntax +922 -0
  49. data/lib/textpow/syntax/source.fortran.syntax +141 -0
  50. data/lib/textpow/syntax/source.fscript.syntax +80 -0
  51. data/lib/textpow/syntax/source.fxscript.syntax +142 -0
  52. data/lib/textpow/syntax/source.gri.syntax +83 -0
  53. data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
  54. data/lib/textpow/syntax/source.haskell.syntax +88 -0
  55. data/lib/textpow/syntax/source.icalendar.syntax +32 -0
  56. data/lib/textpow/syntax/source.inform.syntax +48 -0
  57. data/lib/textpow/syntax/source.ini.syntax +55 -0
  58. data/lib/textpow/syntax/source.io.syntax +81 -0
  59. data/lib/textpow/syntax/source.java-props.syntax +20 -0
  60. data/lib/textpow/syntax/source.java.syntax +211 -0
  61. data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
  62. data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
  63. data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
  64. data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
  65. data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
  66. data/lib/textpow/syntax/source.js.syntax +256 -0
  67. data/lib/textpow/syntax/source.js.yui.syntax +176 -0
  68. data/lib/textpow/syntax/source.json.syntax +136 -0
  69. data/lib/textpow/syntax/source.lex.syntax +219 -0
  70. data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
  71. data/lib/textpow/syntax/source.lilypond.syntax +492 -0
  72. data/lib/textpow/syntax/source.lisp.syntax +61 -0
  73. data/lib/textpow/syntax/source.logo.syntax +29 -0
  74. data/lib/textpow/syntax/source.logtalk.syntax +152 -0
  75. data/lib/textpow/syntax/source.lua.syntax +86 -0
  76. data/lib/textpow/syntax/source.makefile.syntax +36 -0
  77. data/lib/textpow/syntax/source.matlab.syntax +142 -0
  78. data/lib/textpow/syntax/source.mel.syntax +92 -0
  79. data/lib/textpow/syntax/source.mips.syntax +66 -0
  80. data/lib/textpow/syntax/source.ml.syntax +121 -0
  81. data/lib/textpow/syntax/source.modula-3.syntax +47 -0
  82. data/lib/textpow/syntax/source.nant-build.syntax +53 -0
  83. data/lib/textpow/syntax/source.objc++.syntax +18 -0
  84. data/lib/textpow/syntax/source.objc.syntax +233 -0
  85. data/lib/textpow/syntax/source.ocaml.syntax +764 -0
  86. data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
  87. data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
  88. data/lib/textpow/syntax/source.open-gl.syntax +14 -0
  89. data/lib/textpow/syntax/source.pascal.syntax +77 -0
  90. data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
  91. data/lib/textpow/syntax/source.perl.syntax +1113 -0
  92. data/lib/textpow/syntax/source.php.cake.syntax +55 -0
  93. data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
  94. data/lib/textpow/syntax/source.postscript.syntax +114 -0
  95. data/lib/textpow/syntax/source.processing.syntax +106 -0
  96. data/lib/textpow/syntax/source.prolog.syntax +40 -0
  97. data/lib/textpow/syntax/source.python.django.syntax +21 -0
  98. data/lib/textpow/syntax/source.python.syntax +868 -0
  99. data/lib/textpow/syntax/source.qmake.syntax +114 -0
  100. data/lib/textpow/syntax/source.quake-config.syntax +32 -0
  101. data/lib/textpow/syntax/source.r-console.syntax +16 -0
  102. data/lib/textpow/syntax/source.r.syntax +81 -0
  103. data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
  104. data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
  105. data/lib/textpow/syntax/source.regexp.syntax +50 -0
  106. data/lib/textpow/syntax/source.remind.syntax +253 -0
  107. data/lib/textpow/syntax/source.rez.syntax +80 -0
  108. data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
  109. data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
  110. data/lib/textpow/syntax/source.ruby.syntax +1035 -0
  111. data/lib/textpow/syntax/source.s5.syntax +69 -0
  112. data/lib/textpow/syntax/source.sass.syntax +45 -0
  113. data/lib/textpow/syntax/source.scheme.syntax +347 -0
  114. data/lib/textpow/syntax/source.scilab.syntax +41 -0
  115. data/lib/textpow/syntax/source.scss.syntax +527 -0
  116. data/lib/textpow/syntax/source.shell.syntax +384 -0
  117. data/lib/textpow/syntax/source.slate.syntax +149 -0
  118. data/lib/textpow/syntax/source.smarty.syntax +63 -0
  119. data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
  120. data/lib/textpow/syntax/source.sql.syntax +237 -0
  121. data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
  122. data/lib/textpow/syntax/source.strings.syntax +39 -0
  123. data/lib/textpow/syntax/source.swig.syntax +57 -0
  124. data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
  125. data/lib/textpow/syntax/source.tcl.syntax +152 -0
  126. data/lib/textpow/syntax/source.yaml.syntax +160 -0
  127. data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
  128. data/lib/textpow/syntax/text.bbcode.syntax +287 -0
  129. data/lib/textpow/syntax/text.bibtex.syntax +151 -0
  130. data/lib/textpow/syntax/text.blog.html.syntax +41 -0
  131. data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
  132. data/lib/textpow/syntax/text.blog.syntax +27 -0
  133. data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
  134. data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
  135. data/lib/textpow/syntax/text.haml.syntax +88 -0
  136. data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
  137. data/lib/textpow/syntax/text.html.asp.syntax +27 -0
  138. data/lib/textpow/syntax/text.html.basic.syntax +362 -0
  139. data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
  140. data/lib/textpow/syntax/text.html.django.syntax +36 -0
  141. data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
  142. data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
  143. data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
  144. data/lib/textpow/syntax/text.html.mason.syntax +119 -0
  145. data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
  146. data/lib/textpow/syntax/text.html.mt.syntax +162 -0
  147. data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
  148. data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
  149. data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
  150. data/lib/textpow/syntax/text.html.textile.syntax +215 -0
  151. data/lib/textpow/syntax/text.html.tt.syntax +121 -0
  152. data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
  153. data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
  154. data/lib/textpow/syntax/text.log.latex.syntax +50 -0
  155. data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
  156. data/lib/textpow/syntax/text.man.syntax +17 -0
  157. data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
  158. data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
  159. data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
  160. data/lib/textpow/syntax/text.plain.syntax +32 -0
  161. data/lib/textpow/syntax/text.plist.syntax +635 -0
  162. data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
  163. data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
  164. data/lib/textpow/syntax/text.setext.syntax +147 -0
  165. data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
  166. data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
  167. data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
  168. data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
  169. data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
  170. data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
  171. data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
  172. data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
  173. data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
  174. data/lib/textpow/syntax/text.tex.math.syntax +49 -0
  175. data/lib/textpow/syntax/text.tex.syntax +86 -0
  176. data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
  177. data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
  178. data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
  179. data/lib/textpow/syntax/text.xml.syntax +180 -0
  180. data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
  181. data/lib/textpow/version.rb +3 -0
  182. data/spec/fixtures/objeck.plist +107 -0
  183. data/spec/fixtures/utf8.txt +1 -0
  184. data/spec/spec_helper.rb +2 -0
  185. data/spec/textpow/score_manager_spec.rb +20 -0
  186. data/spec/textpow/syntax_files_spec.rb +26 -0
  187. data/spec/textpow/syntax_spec.rb +225 -0
  188. data/spec/textpow_spec.rb +57 -0
  189. data/textpow.gemspec +19 -0
  190. metadata +246 -68
  191. data/Manifest.txt +0 -13
  192. data/mm/manual.mm +0 -266
  193. data/test/test_textpow.rb +0 -25
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: svn-commit.tmp
3
+ fileTypes:
4
+ - svn-commit.tmp
5
+ - svn-commit.2.tmp
6
+ scopeName: text.subversion-commit
7
+ uuid: 5B201F55-90BC-4A69-9A44-1BABE5A9FE99
8
+ patterns:
9
+ - name: meta.bullet-point.strong
10
+ captures:
11
+ "1":
12
+ name: punctuation.definition.item.subversion-commit
13
+ match: "^\\s*(\xE2\x80\xA2).*$\\n?"
14
+ - name: meta.bullet-point.light
15
+ captures:
16
+ "1":
17
+ name: punctuation.definition.item.subversion-commit
18
+ match: "^\\s*(\xC2\xB7).*$\\n?"
19
+ - name: meta.bullet-point.star
20
+ captures:
21
+ "1":
22
+ name: punctuation.definition.item.subversion-commit
23
+ match: ^\s*(\*).*$\n?
24
+ - name: meta.scope.changed-files.svn
25
+ begin: (^--This line, and those below, will be ignored--$\n?)
26
+ beginCaptures:
27
+ "1":
28
+ name: meta.separator.svn
29
+ end: ^--not gonna happen--$
30
+ patterns:
31
+ - name: markup.inserted.svn
32
+ match: ^A\s+.*$\n?
33
+ - name: markup.changed.svn
34
+ match: ^(M|.M)\s+.*$\n?
35
+ - name: markup.deleted.svn
36
+ match: ^D\s+.*$\n?
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: CSV
3
+ fileTypes:
4
+ - csv
5
+ scopeName: text.tabular.csv
6
+ repository:
7
+ row:
8
+ name: meta.tabular.row.csv
9
+ begin: ^(?!$)
10
+ end: $
11
+ patterns:
12
+ - include: "#field"
13
+ field:
14
+ patterns:
15
+ - endCaptures:
16
+ "1":
17
+ name: punctuation.definition.field.csv
18
+ "3":
19
+ name: punctuation.separator.tabular.field.csv
20
+ begin: (^|(?<=,))(")
21
+ contentName: meta.tabular.field.quoted.csv
22
+ beginCaptures:
23
+ "2":
24
+ name: punctuation.definition.field.csv
25
+ end: (")($|(,))
26
+ patterns:
27
+ - name: constant.character.escape.straight-quote.csv
28
+ match: "\"\""
29
+ comment: "\n\
30
+ \t\t\t\t\t\tthis field uses \"s and is thus able to enclose\n\
31
+ \t\t\t\t\t\tnewlines or commas\n\
32
+ \t\t\t\t\t"
33
+ - endCaptures:
34
+ "1":
35
+ name: punctuation.separator.tabular.field.csv
36
+ begin: (:^|(?<=,))(?!$|,)
37
+ contentName: meta.tabular.field.csv
38
+ end: $|(,)
39
+ - name: punctuation.separator.tabular.field.csv
40
+ match: ","
41
+ header:
42
+ name: meta.tabular.row.header.csv
43
+ begin: ^(?!$)
44
+ end: $
45
+ patterns:
46
+ - include: "#field"
47
+ table:
48
+ name: meta.tabular.table.csv
49
+ begin: ^
50
+ end: ^$not possible$^
51
+ patterns:
52
+ - include: "#header"
53
+ - begin: (\n)
54
+ beginCaptures:
55
+ "1":
56
+ name: punctuation.separator.table.row.csv
57
+ end: ^$not possible$^
58
+ patterns:
59
+ - include: "#row"
60
+ - name: punctuation.separator.table.row.csv
61
+ match: \n
62
+ comment: "\n\
63
+ \t\t\t\t\t\teverything after the first row is not a header\n\
64
+ \t\t\t\t\t"
65
+ uuid: B0691F9F-D279-48CB-8959-2C9426579002
66
+ patterns:
67
+ - include: "#table"
68
+ keyEquivalent: ^~C
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: TSV
3
+ fileTypes:
4
+ - tsv
5
+ scopeName: text.tabular.tsv
6
+ repository:
7
+ row:
8
+ name: meta.tabular.row.tsv
9
+ begin: ^(?!$)
10
+ end: $
11
+ patterns:
12
+ - include: "#field"
13
+ field:
14
+ patterns:
15
+ - endCaptures:
16
+ "1":
17
+ name: punctuation.separator.tabular.field.tsv
18
+ begin: (:^|(?<=\t))(?!$|\t)
19
+ contentName: meta.tabular.field.tsv
20
+ end: $|(\t)
21
+ - name: punctuation.separator.tabular.field.tsv
22
+ match: \t
23
+ header:
24
+ name: meta.tabular.row.header.tsv
25
+ begin: ^(?!$)
26
+ end: $
27
+ patterns:
28
+ - include: "#field"
29
+ table:
30
+ name: meta.tabular.table.tsv
31
+ begin: ^
32
+ end: ^$not possible$^
33
+ patterns:
34
+ - include: "#header"
35
+ - begin: (\n)
36
+ beginCaptures:
37
+ "1":
38
+ name: punctuation.separator.table.row.tsv
39
+ end: ^$not possible$^
40
+ patterns:
41
+ - include: "#row"
42
+ - name: punctuation.separator.table.row.tsv
43
+ match: \n
44
+ comment: "\n\
45
+ \t\t\t\t\t\teverything after the first row is not a header\n\
46
+ \t\t\t\t\t"
47
+ uuid: 7D87F38B-A972-4F61-B9C0-7D6D15EEED38
48
+ patterns:
49
+ - include: "#table"
50
+ keyEquivalent: ^~T
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: LaTeX Beamer
3
+ fileTypes: []
4
+
5
+ firstLineMatch: ^\\documentclass(\[.*\])?\{beamer\}
6
+ scopeName: text.tex.latex.beamer
7
+ uuid: 2ACA20AA-B008-469B-A04A-6DE232973ED8
8
+ foldingStartMarker: \\begin\{.*\}|%.*\(fold\)\s*$
9
+ patterns:
10
+ - name: meta.function.environment.frame.latex
11
+ captures:
12
+ "1":
13
+ name: support.function.be.latex
14
+ "2":
15
+ name: punctuation.definition.function.latex
16
+ "3":
17
+ name: punctuation.definition.arguments.begin.latex
18
+ "4":
19
+ name: variable.parameter.function.latex
20
+ "5":
21
+ name: punctuation.definition.arguments.end.latex
22
+ begin: (?:\s*)((\\)begin)(\{)(frame)(\})
23
+ end: ((\\)end)(\{)(frame)(\})
24
+ patterns:
25
+ - name: support.function.with-arg.latex
26
+ captures:
27
+ "1":
28
+ name: support.function.with-arg.latex
29
+ "2":
30
+ name: punctuation.definition.function.latex
31
+ "3":
32
+ name: punctuation.definition.arguments.begin.latex
33
+ "4":
34
+ name: entity.name.function.frame.latex
35
+ "5":
36
+ name: punctuation.definition.arguments.end.latex
37
+ match: ((\\)frametitle)(\{)(.*)(\})
38
+ - include: $self
39
+ - include: text.tex.latex
40
+ foldingStopMarker: \\end\{.*\}|%.*\(end\)\s*$
41
+ keyEquivalent: ^~B
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Literate Haskell
3
+ fileTypes:
4
+ - lhs
5
+ scopeName: text.tex.latex.haskell
6
+ uuid: 439807F5-7129-487D-B5DC-95D5272B43DD
7
+ patterns:
8
+ - name: meta.function.embedded.haskell.latex
9
+ captures:
10
+ "1":
11
+ name: support.function.be.latex
12
+ "2":
13
+ name: punctuation.definition.function.latex
14
+ "3":
15
+ name: punctuation.definition.arguments.begin.latex
16
+ "4":
17
+ name: punctuation.definition.arguments.end.latex
18
+ begin: ^((\\)begin)({)code(})(\s*\n)?
19
+ contentName: source.haskell.embedded.latex
20
+ end: ^((\\)end)({)code(})
21
+ patterns:
22
+ - include: source.haskell
23
+ - include: text.tex.latex
24
+ keyEquivalent: ^~H
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: LaTeX Memoir
3
+ fileTypes: []
4
+
5
+ firstLineMatch: ^\\documentclass(\[.*\])?\{memoir\}
6
+ scopeName: text.tex.latex.memoir
7
+ uuid: D0853B20-ABFF-48AB-8AB9-3D8BA0755C05
8
+ foldingStartMarker: \\begin\{.*\}|%.*\(fold\)\s*$
9
+ patterns:
10
+ - name: meta.function.memoir-fbox.latex
11
+ captures:
12
+ "1":
13
+ name: support.function.be.latex
14
+ "2":
15
+ name: punctuation.definition.function.latex
16
+ "3":
17
+ name: punctuation.definition.arguments.begin.latex
18
+ "4":
19
+ name: variable.parameter.function.latex
20
+ "5":
21
+ name: punctuation.definition.arguments.end.latex
22
+ begin: (?:\s*)((\\)begin)(\{)(framed|shaded|leftbar)(\})
23
+ end: ((\\)end)(\{)(\4)(\})
24
+ patterns:
25
+ - include: $self
26
+ - name: meta.function.memoir-verbatim.latex
27
+ captures:
28
+ "1":
29
+ name: support.function.be.latex
30
+ "2":
31
+ name: punctuation.definition.function.latex
32
+ "3":
33
+ name: punctuation.definition.arguments.begin.latex
34
+ "4":
35
+ name: variable.parameter.function.latex
36
+ "5":
37
+ name: punctuation.definition.arguments.end.latex
38
+ begin: (?:\s*)((\\)begin)(\{)((?:fboxv|boxedv|V)erbatim)(\})
39
+ contentName: markup.raw.verbatim.latex
40
+ end: ((\\)end)(\{)(\4)(\})
41
+ - name: meta.function.memoir-alltt.latex
42
+ captures:
43
+ "1":
44
+ name: support.function.be.latex
45
+ "2":
46
+ name: punctuation.definition.function.latex
47
+ "3":
48
+ name: punctuation.definition.arguments.begin.latex
49
+ "4":
50
+ name: variable.parameter.function.latex
51
+ "5":
52
+ name: punctuation.definition.arguments.end.latex
53
+ begin: (?:\s*)((\\)begin)(\{)(alltt)(\})
54
+ contentName: markup.raw.verbatim.latex
55
+ end: ((\\)end)(\{)(alltt)(\})
56
+ patterns:
57
+ - name: support.function.general.tex
58
+ captures:
59
+ "1":
60
+ name: punctuation.definition.function.tex
61
+ match: (\\)[A-Za-z]+
62
+ - include: text.tex.latex
63
+ foldingStopMarker: \\end\{.*\}|%.*\(end\)\s*$
64
+ keyEquivalent: ^~M
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: Rd (R Documentation)
3
+ fileTypes:
4
+ - rd
5
+ scopeName: text.tex.latex.rd
6
+ uuid: 80A00288-FE7E-4E66-B5BF-4948A2828203
7
+ foldingStartMarker: /\w*\{\s*$
8
+ patterns:
9
+ - name: meta.section.rd
10
+ endCaptures:
11
+ "1":
12
+ name: punctuation.definition.arguments.end.rd
13
+ begin: ((\\)(?:alias|docType|keyword|name|title))(\{)
14
+ contentName: entity.name.tag.rd
15
+ beginCaptures:
16
+ "1":
17
+ name: keyword.other.section.rd
18
+ "2":
19
+ name: punctuation.definition.function.rd
20
+ "3":
21
+ name: punctuation.definition.arguments.begin.rd
22
+ end: (\})
23
+ patterns:
24
+ - include: $self
25
+ - name: meta.section.rd
26
+ endCaptures:
27
+ "1":
28
+ name: punctuation.definition.arguments.end.rd
29
+ begin: ((\\)(?:details|format|references|source))(\{)
30
+ beginCaptures:
31
+ "1":
32
+ name: keyword.other.section.rd
33
+ "2":
34
+ name: punctuation.definition.function.rd
35
+ "3":
36
+ name: punctuation.definition.arguments.begin.rd
37
+ end: (\})
38
+ patterns:
39
+ - include: $self
40
+ - name: meta.usage.rd
41
+ endCaptures:
42
+ "1":
43
+ name: punctuation.definition.arguments.end.rd
44
+ begin: ((\\)(?:usage))(\{)(?:\n)?
45
+ contentName: source.r.embedded
46
+ beginCaptures:
47
+ "1":
48
+ name: keyword.other.usage.rd
49
+ "2":
50
+ name: punctuation.definition.function.rd
51
+ "3":
52
+ name: punctuation.definition.arguments.begin.rd
53
+ end: (\})
54
+ patterns:
55
+ - include: source.r
56
+ - name: meta.examples.rd
57
+ endCaptures:
58
+ "1":
59
+ name: punctuation.definition.arguments.end.rd
60
+ begin: ((\\)(?:examples))(\{)(?:\n)?
61
+ contentName: source.r.embedded
62
+ beginCaptures:
63
+ "1":
64
+ name: keyword.other.examples.rd
65
+ "2":
66
+ name: punctuation.definition.function.rd
67
+ "3":
68
+ name: punctuation.definition.arguments.begin.rd
69
+ end: (\})
70
+ patterns:
71
+ - include: source.r
72
+ - name: meta.author.rd
73
+ captures:
74
+ "6":
75
+ name: markup.underline.link.rd
76
+ "7":
77
+ name: punctuation.definition.link.rd
78
+ "1":
79
+ name: keyword.other.author.rd
80
+ "2":
81
+ name: punctuation.definition.function.rd
82
+ "3":
83
+ name: punctuation.definition.arguments.begin.rd
84
+ "4":
85
+ name: entity.name.tag.author.rd
86
+ "5":
87
+ name: punctuation.definition.link.rd
88
+ match: ((\\)(?:author))(\{)([\w\s]+?)\s+(<)([^>]*)(>)
89
+ - include: text.tex.latex
90
+ foldingStopMarker: ^\s*\}
91
+ keyEquivalent: ^~R
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: SWeave
3
+ fileTypes:
4
+ - Snw
5
+ - Rnw
6
+ - snw
7
+ - rnw
8
+ firstLineMatch: ^\\documentclass(?!.*\{beamer\})|^<<(.?*)>>=$
9
+ scopeName: text.tex.latex.sweave
10
+ uuid: 1F450973-8259-4BA2-A754-48C634561A13
11
+ foldingStartMarker: ^<<(.?*)>>=|\\begin\{.*\}
12
+ patterns:
13
+ - name: meta.block.parameters.sweave
14
+ endCaptures:
15
+ "1":
16
+ name: punctuation.definition.parameters.end.sweave
17
+ begin: ^(<<)
18
+ beginCaptures:
19
+ "1":
20
+ name: punctuation.definition.parameters.begin.sweave
21
+ end: (>>)(?==)
22
+ patterns:
23
+ - name: meta.parameter.sweave
24
+ captures:
25
+ "1":
26
+ name: keyword.other.name-of-parameter.sweave
27
+ "2":
28
+ name: punctuation.separator.key-value.sweave
29
+ "3":
30
+ name: constant.language.boolean.sweave
31
+ "4":
32
+ name: constant.language.results.sweave
33
+ "5":
34
+ name: string.unquoted.label.sweave
35
+ match: (\w+)(=)(?:(true|false)|(verbatim|tex|hide)|([\w.]+))
36
+ - name: string.unquoted.label.sweave
37
+ match: "[\\w.]+"
38
+ - name: punctuation.separator.parameters.sweave
39
+ match: ","
40
+ - name: meta.block.code.sweave
41
+ endCaptures:
42
+ "1":
43
+ name: punctuation.section.embedded.end.sweave
44
+ "2":
45
+ name: comment.line.other.sweave
46
+ begin: (?<=>>)(=)(.*)\n
47
+ contentName: source.r.embedded.sweave
48
+ beginCaptures:
49
+ "1":
50
+ name: punctuation.section.embedded.begin.sweave
51
+ "2":
52
+ name: comment.line.other.sweave
53
+ end: ^(@)(.*)$
54
+ patterns:
55
+ - name: invalid.illegal.sweave
56
+ match: ^\s+@.*\n?
57
+ - include: source.r
58
+ - name: invalid.illegal.sweave
59
+ match: ^\s+<<.*\n?
60
+ - name: meta.block.source.r
61
+ captures:
62
+ "1":
63
+ name: punctuation.definition.arguments.begin.latex
64
+ "2":
65
+ name: punctuation.definition.arguments.end.latex
66
+ begin: ^\\begin(\{)Scode(\})
67
+ contentName: source.r.embedded.sweave
68
+ end: ^\\end(\{)Scode(\})
69
+ patterns:
70
+ - include: source.r
71
+ - name: source.r.embedded.sweave
72
+ endCaptures:
73
+ "1":
74
+ name: punctuation.definition.arguments.end.latex
75
+ begin: \\Sexpr(\{)
76
+ beginCaptures:
77
+ "1":
78
+ name: punctuation.definition.arguments.begin.latex
79
+ end: (\})
80
+ patterns:
81
+ - include: source.r
82
+ - include: text.tex.latex
83
+ foldingStopMarker: ^@(.?*)$|\\end\{.*\}
84
+ keyEquivalent: ^~S