Commits

Eric Knibbe committed 7f1738f Draft

adding reST CLM

  • Participants
  • Parent commits 9932588

Comments (0)

Files changed (2)

bbedit/reStructuredText.plist

+<?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">
+<!--
+	BBEdit codeless language module for reStructuredText files.
+	Eric Knibbe
+	Version 0.1
+
+	Parses each section title as a function name so they show up in the function
+	popup. (Can't indent them according to heading level nor nest fold markers in
+	the sidebar due to limitations with CLMs). Will also highlight directives,
+	directive options, roles, field names, substitutions, references, targets,
+	interpreted text, and comment blocks.
+
+	Requires BBEdit 8.5 or TextWrangler 3.5 or later. To install, copy to either:
+
+		~/Library/Application Support/BBEdit/Language Modules/
+		~/Library/Application Support/TextWrangler/Language Modules/
+
+	and relaunch BBEdit or TextWrangler.
+-->
+<dict>
+	<key>BBEditDocumentType</key>
+	<string>CodelessLanguageModule</string>
+	<key>BBLMLanguageDisplayName</key>
+	<string>reStructuredText</string>
+	<key>BBLMLanguageCode</key>
+	<string>reST</string>
+	<key>BBLMSuffixMap</key>
+	<array>
+		<dict>
+			<key>BBLMLanguageSuffix</key>
+			<string>.rst</string>
+		</dict>
+		<dict>
+			<key>BBLMLanguageSuffix</key>
+			<string>.txt</string>
+		</dict>
+	</array>
+	<key>BBLMColorsSyntax</key>
+	<true/>
+	<key>BBLMScansFunctions</key>
+	<true/>
+	<key>BBLMIsCaseSensitive</key>
+	<false/>
+	<key>BBLMCanSpellCheckCodeRuns</key>
+	<true/>
+	<key>Language Features</key>
+	<dict>
+		<key>Identifier and Keyword Character Class</key>
+		<string>-\w.:</string>
+		<key>String Pattern</key>
+		<string><![CDATA[(?x:
+			(?<![-\w]):(?!\s)([-\w]+:)?(\\:|[-\w+'"=. \t])+(?<!\s):	|	(?# role/directive option/field name)
+			\|(?!\s)(\\\||[^|\r])+(?<!\s)\|_{0,2}				| (?# substitution)
+			(?<!\w)[a-zA-Z0-9][-\w]*__?(?!\w)						|	(?# hyperlink reference)
+			(?<![`\\])`(?!\s)(\\`|[^`])+(?<!\s)`_{0,2}	|	(?# phrase reference/interpreted text)
+			_`(\\`|[^`])+`															| (?# inline internal target)
+			\[([-\w#.]+|\*)\]_													| (?# footnote/citation reference)
+			(?<=\.\.)[ \t]+\[([-\w#.]+|\*)\](?=\s)			| (?# footnote/citation target)
+			(?<=\.\.)[ \t]+_((\\:|[^:\r])+|`(\\`|[^`\r])+`):(?=\s)	(?# hyperlink target)
+		)]]></string>
+		<key>Comment Pattern</key><!-- BUG: matches directives with a specified Sphinx domain -->
+		<string><![CDATA[(?x:
+			^[ \t]*\.\. (
+				[ \t]+ (
+					[^\w[|][^\r]* |
+					[-a-zA-Z0-9]+ (
+						[^-a-zA-Z0-9\r] (
+							[^:\r] | $
+						) [^\r]* | $
+					)
+				) \r (
+					[ \t]*\r
+				)? | [ \t]*\r
+			) (
+				[ \t]+[^\r]+\r (
+					[ \t]*\r
+				)?
+			)*
+		)]]></string>
+		<key>Function Pattern</key>
+		<string><![CDATA[(?x:
+			(?P<function>
+				^[ ]?(?P<function_name>[^\r]+)\r
+				^(?P<bar>[-=`:.'"~^_*+#!$%&(),/;<>?@[\]\{|}])(?P=bar)+\s*$
+				(?s).*?
+			)
+			(?=
+				(\r
+					(?-s).+\r
+					^(?P<nextbar>[-=`:.'"~^_*+#!$%&(),/;<>?@[\]\{|}])(?P=nextbar)+\s*$
+				) | (?-m)$
+			)
+		)]]></string>
+		<key>Skip Pattern</key>
+		<string><![CDATA[(?x:
+			(?P>string) |
+			(?P>comment)
+		)]]></string>
+	</dict>
+	<key>BBLMKeywordList</key><!-- reStructuredText directives -->
+	<array>
+		<string>..</string>
+		<string>::</string>
+		<string>attention::</string>
+		<string>caution::</string>
+		<string>danger::</string>
+		<string>error::</string>
+		<string>hint::</string>
+		<string>important::</string>
+		<string>note::</string>
+		<string>tip::</string>
+		<string>warning::</string>
+		<string>admonition::</string>
+		<string>image::</string>
+		<string>figure::</string>
+		<string>topic::</string>
+		<string>sidebar::</string>
+		<string>line-block::</string><!-- deprecated -->
+		<string>parsed-literal::</string>
+		<string>code::</string>
+		<string>math::</string>
+		<string>rubric::</string>
+		<string>epigraph::</string>
+		<string>highlights::</string>
+		<string>pull-quote::</string>
+		<string>compound::</string>
+		<string>container::</string>
+		<string>table::</string>
+		<string>csv-table::</string>
+		<string>list-table::</string>
+		<string>contents::</string>
+		<string>sectnum::</string>
+		<string>section-numbering::</string>
+		<string>header::</string>
+		<string>footer::</string>
+		<string>target-notes::</string>
+		<string>footnotes::</string><!-- future -->
+		<string>citations::</string><!-- future -->
+		<string>meta::</string>
+		<string>imagemap::</string><!-- future -->
+		<string>replace::</string>
+		<string>unicode::</string>
+		<string>date::</string>
+		<string>include::</string>
+		<string>raw::</string>
+		<string>class::</string>
+		<string>role::</string>
+		<string>default-role::</string>
+		<string>title::</string>
+		<string>restructuredtext-test-directive::</string>
+	</array>
+	<key>BBLMPredefinedNameList</key><!-- Sphinx directives -->
+	<array>
+		<string>acks::</string><!-- undocumented -->
+		<string>centered::</string><!-- deprecated -->
+		<string>code-block::</string>
+		<string>codeauthor::</string>
+		<string>cssclass::</string><!-- old -->
+		<string>default-domain::</string>
+		<string>deprecated::</string>
+		<string>describe::</string><!-- old -->
+		<string>envvar::</string>
+		<string>glossary::</string>
+		<string>highlight::</string>
+		<string>highlightlang::</string><!-- old -->
+		<string>hlist::</string>
+		<string>index::</string>
+		<string>literalinclude::</string>
+		<string>moduleauthor::</string><!-- undocumented -->
+		<string>object::</string>
+		<string>only::</string>
+		<string>option::</string>
+		<string>productionlist::</string>
+		<string>program::</string>
+		<string>rst-class::</string>
+		<string>sectionauthor::</string>
+		<string>seealso::</string>
+		<string>sourcecode::</string><!-- old -->
+		<string>tabularcolumns::</string>
+		<string>toctree::</string>
+		<string>versionadded::</string>
+		<string>versionchanged::</string>
+		<string>module::</string>
+		<string>currentmodule::</string>
+		<string>data::</string>
+		<string>exception::</string>
+		<string>function::</string>
+		<string>class::</string>
+		<string>attribute::</string>
+		<string>method::</string>
+		<string>staticmethod::</string>
+		<string>classmethod::</string>
+		<string>decorator::</string>
+		<string>decoratormethod::</string>
+		<string>member::</string>
+		<string>macro::</string>
+		<string>type::</string>
+		<string>var::</string>
+		<string>directive::</string>
+		<string>role::</string>
+		<string>automodule::</string>
+		<string>autoclass::</string>
+		<string>autoexception::</string>
+		<string>autofunction::</string>
+		<string>autodata::</string>
+		<string>automethod::</string>
+		<string>autoattribute::</string>
+		<string>autosummary::</string>
+		<string>testsetup::</string>
+		<string>testcleanup::</string>
+		<string>doctest::</string>
+		<string>testcode::</string>
+		<string>testoutput::</string>
+		<string>math::</string>
+		<string>graphviz::</string>
+		<string>graph::</string>
+		<string>digraph::</string>
+		<string>inheritance-diagram::</string>
+		<string>ifconfig::</string>
+		<string>todo::</string>
+		<string>todolist::</string>
+	</array>
+</dict>
+</plist>
 <title>Eric's bits of code</title>
 </head>
 <body>
-Just bits of code I've written, in case someone else finds them useful.
+Just bits of code I've written, in case someone else finds them useful. <br>
+<a href="https://bitbucket.org/EricFromCanada/ericfromcanada.bitbucket.org/src/">Browse all files</a>
 <dl>
-	<dt><a href="bash/keyputter.sh">keyputter.sh</a></dt>
+	<dt><a href="https://bitbucket.org/EricFromCanada/ericfromcanada.bitbucket.org/raw/default/bash/keyputter.sh">keyputter.sh</a></dt>
 	<dd>Handy if you have a bunch of servers you need to install your SSH key onto.</dd>
 				
-	<dt><a href="javascript/touch-menus-plus.js">touch-menus-plus.js</a></dt>
+	<dt><a href="https://bitbucket.org/EricFromCanada/ericfromcanada.bitbucket.org/raw/default/javascript/touch-menus-plus.js">touch-menus-plus.js</a></dt>
 	<dd>Makes navigation links with drop-down menus usable on iOS by only enabling
 		the link if its submenu is visible. This is only required if JavaScript is
 		used to hide and show submenus, since iOS accounts for CSS-based menus by
 		preventing a :hover region's links from activating until any divs it'll
 		reveal are displayed.<br>
 		<a href="http://www.treefrog.ca/">See it in action</a></dd>
+	
+	<dt><a href="https://bitbucket.org/EricFromCanada/ericfromcanada.bitbucket.org/raw/default/bbedit/reStructuredText.plist">reST codeless language module</a></dt>
+	<dd>Language module for BBEdit and TextWrangler which highlights elements 
+		in reStructuredText files and lists section titles in the function pop-up
+		menu. Recognizes both standard reST directives and Sphinx additions.</dd>
+			
+	<dt><a href="https://bitbucket.org/EricFromCanada/pygments-main">Lasso lexer for Pygments</a></dt>
+	<dd>Contributed a lexer for the Lasso programming language for the 
+		<a href="http://pygments.org/">Pygments</a> syntax highlighter. Expect to
+		see it included in version 1.6.</dd>
+	
+			
 </dl>
 
 <a href="https://twitter.com/EricFromCanada">Twitter</a>