Skip to content

Instantly share code, notes, and snippets.

@JTBrinkmann
Last active June 7, 2016 14:50
Show Gist options
  • Save JTBrinkmann/567a4f73c2ff06a4e7473c9e522823ca to your computer and use it in GitHub Desktop.
Save JTBrinkmann/567a4f73c2ff06a4e7473c9e522823ca to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>txt</string>
</array>
<!--<key>foldingStartMarker</key>
<string>^\s*(?:#.*?=>|([-%\:\.\w\=].*))\s$</string>
<key>foldingStopMarker</key>
<string>^\s*$</string>-->
<!--<key>keyEquivalent</key>
<string>^~S</string>-->
<key>name</key>
<string>JTB Plaintext</string>
<key>patterns</key>
<array>
<dict> <!-- Comments -->
<key>match</key>
<string>((?://|#)\s+.*)$\n?</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>comment.line.double-slash.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- Comment Blocks -->
<key>begin</key>
<string>/\*</string>
<key>end</key>
<string>\*/</string>
<key>name</key>
<string>comment.block.js</string>
</dict>
<dict> <!-- (Comment in Brackets) -->
<key>match</key>
<string>\(.+?\)</string>
<key>name</key>
<string>comment.block.js</string>
</dict>
<dict> <!-- Numbers -->
<key>match</key>
<string>(?&lt;!\$)\b((0([box])[0-9a-fA-F][0-9a-fA-F\_]*)|([0-9][0-9\_]*(\.[0-9\_]+)?(e[+\-]?[0-9\_]+)?))(?:([a-z_-]*\b)|(%?))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.numeric.jtb_plaintext</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>comment.unit.jtb_plaintext</string>
</dict>
<key>8</key>
<dict>
<key>name</key>
<string>storage.int.percentage.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- String -->
<key>match</key>
<string>".*?"</string>
<key>name</key>
<string>string.quoted.double.jtb_plaintext</string>
</dict>
<dict> <!-- Number-Units -->
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.numeric.livescript</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>comment.unit.livescript</string>
</dict>
</dict>
<key>match</key>
<string>(?&lt;!\$)\b((0([box])[0-9a-fA-F][0-9a-fA-F\_]*)|([0-9][0-9\_]*(\.[0-9\_]+)?(e[+\-]?[0-9\_]+)?))(\w*)\b</string>
</dict>
<dict> <!-- ```interpolated JS``` -->
<key>begin</key>
<string>```</string>
<key>end</key>
<string>```</string>
<key>name</key>
<string>string.interpolated.block.jtb_plaintext</string>
</dict>
<dict> <!-- `interpolated JS` -->
<key>begin</key>
<string>`</string>
<key>end</key>
<string>`</string>
<key>name</key>
<string>string.interpolated.inline.jtb_plaintext</string>
</dict>
<dict> <!-- function() -->
<key>match</key>
<string>\w+\(\w*\)</string>
<key>name</key>
<string>variable.parameter.function.jtb_plaintext</string>
</dict>
<dict> <!-- escaped characters -->
<key>match</key>
<string>(\\.)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>constant.character.escape.jtb_plaintext</string>
</dict>
</dict>
</dict>
<!-- = Text EyeCandy = -->
<dict> <!-- *action* -->
<key>match</key>
<string>(?=\W)(\*\w[^\n]{1,40}\w\*)(?=\W)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.action.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- speaker -->
<key>match</key>
<string>^\s*(\S+:)\s</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.speaker.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- Headline -->
<key>match</key>
<string>^\s*(==.*?==)\s*$</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.headline.saml</string>
</dict>
</dict>
</dict>
<dict> <!-- Sub-Headline -->
<key>match</key>
<string>^\s*(=.*?=)\s*$</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.subheadline.saml</string>
</dict>
</dict>
</dict>
<dict> <!-- bullet point -->
<key>match</key>
<string>^\s*(-|\*)(?=\s)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.bulletpoint.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- selectors -->
<key>match</key>
<string>[\s\/]([\.#\$!@][\w-]+)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.function.jtb_plaintext</string>
</dict>
</dict>
</dict>
<dict> <!-- operators -->
<key>match</key>
<string>\+|-|/|\*|^|%|!|\?|…|\.\.\.</string>
<key>name</key>
<string>constant.language.operator.jtb_plaintext</string>
</dict>
<dict> <!-- keywords -->
<key>match</key>
<string>(?i)\b(fix|improve|if|else|otherwise|that|which|after|before|when|while|unless|and|or|instead of)\b</string>
<key>name</key>
<string>keyword.language.jtb_plaintext</string>
</dict>
<dict> <!-- keywords -->
<key>match</key>
<string>(?i)\b(user|error|it|feature|button|input|client|server)s?\b</string>
<key>name</key>
<string>support.class.jtb_plaintext</string>
</dict>
<dict> <!-- capitalized words -->
<key>match</key>
<string>\b\w*[A-Z]\w+\b</string>
<key>name</key>
<string>support.class.jtb_plaintext</string>
</dict>
<dict> <!-- smiley -->
<key>match</key>
<string>[\>]?[:;=xX8][\^\-']?[\)\(D\|\/\\3PICS@]+|[\)\(D\|\/\\PICS@]+[\^\-']?[:;=8][&lt;]?|\(?[\*]?[\^xX&lt;\>\*\~;oóòöOÓÒÖQT][_\-\.ou]+[\^xX&lt;\>\*\~;oóòöOÓÒÖQT][\*#;']?\)?|\^\^|[oóò][OÓÒ]|[OÓÒ][oóò]|[óòÓÒ][óòÓÒ]|&lt;[\/\\]?[34]|[oO\>]\/\/+[oO&lt;]</string>
<!-- 1 | 1b |. 2 | 2b .| 3 | 4 -->
<!--
1. :) :( :D :| :/ :\ :3 :P :I :C :S :@
1b. ): (: D: |: /: \: I: C: S: @:
eyes: :) =) X) 8)
nose: :^) :-) :')
above-eyes: >:)
mouth: :)))) :DDDDD
2. ^_^ ^-^ ^.^
eyes: o_o o_O ó_Ò x_x >_< *_* ~_~ ;_; Q_Q T_T etc
mouth: ^_^ ^-^ ^.^ ^o^ ^u^
head: (^_^)
extra: ^_^; ^_^# *^_^*
2b. ^^ oO òó
3. <3 </3 <4
4. o///o
-->
<key>name</key>
<string>meta.smiley.jtb_plaintext</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>continuation</key>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.continuation.jtb_plaintext</string>
</dict>
</dict>
<key>match</key>
<string>(\|)\s*\n</string>
</dict>
<key>interpolated_javascript</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>```</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.javascript</string>
</dict>
</dict>
<key>end</key>
<string>```</string>
<key>name</key>
<string>source.javascript.embedded.source</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.javascript</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>`</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.embedded.javascript</string>
</dict>
</dict>
<key>end</key>
<string>`</string>
<key>name</key>
<string>source.javascript.embedded.source</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.javascript</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>javascriptline</key>
<dict>
<key>begin</key>
<string>=|-|~</string>
<key>contentName</key>
<string>source.javascript.embedded.jtb_plaintext</string>
<key>end</key>
<string>((do|\{)( \|[^|]+\|)?)$|$|^(?!.*\|\s*$)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>source.javascript.embedded.html</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.javascript.start-block</string>
</dict>
</dict>
<key>name</key>
<string>meta.line.javascript.jtb_plaintext</string>
<key>patterns</key>
<array>
<dict>
<key>comment</key>
<string>Hack to let javascript comments work in this context properly</string>
<key>match</key>
<string>//.*$</string>
<key>name</key>
<string>comment.line.number-sign.javascript</string>
</dict>
<dict>
<key>include</key>
<string>#continuation</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>text.jtb_plaintext</string>
<key>uuid</key>
<string>3D727049-DD05-45FF-92A5-BADA55000000</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment