Syntax coloring for Boo in Unitron

From Unify Community Wiki
Jump to: navigation, search

Legacy Notice

This page relates to an older feature or version of Unity that has become either obsolete or deprecated and will very likely be incompatible with recent versions of Unity. Check the legacy section of the official manual for more information on possible alternatives or replacements.


To get Boo syntax highlighting and function finding in Smultron/Unitron you need to put two plists in
Users/{username}/Library/Application Support/Smultron
The first plist adds boo to the list of language files Smultron will read.

SyntaxDefinitions.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>name</key>
		<string>Boo</string>
		<key>file</key>
		<string>boo</string>
		<key>extensions</key>
		<string>boo</string>
	</dict>
</array>
</plist>

The second is the actual syntax highlighting

boo.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>autocompleteWords</key>
	<array>
		<string></string>
	</array>
	<key>beginCommand</key>
	<string></string>
	<key>beginFirstMultiLineComment</key>
	<string></string>
	<key>beginInstruction</key>
	<string></string>
	<key>beginSecondMultiLineComment</key>
	<string></string>
	<key>beginVariable</key>
	<string></string>
	<key>endCommand</key>
	<string></string>
	<key>endFirstMultiLineComment</key>
	<string></string>
	<key>endInstruction</key>
	<string></string>
	<key>endSecondMultiLineComment</key>
	<string></string>
	<key>endVariable</key>
	<string></string>
	<key>firstSingleLineComment</key>
	<string>#</string>
	<key>firstString</key>
	<string>"</string>
	<key>functionDefinition</key>
	<string>^\s*(static)*\s*(def|class).*</string>
	<key>keywords</key>
	<array>
		<string>static</string>
		<string>import</string>
		<string>from</string>
		<string>as</string>
		<string>and</string>
		<string>break</string>
		<string>class</string>
		<string>continue</string>
		<string>def</string>
		<string>elif</string>
		<string>else</string>
		<string>except</string>
		<string>final</string>
		<string>for</string>
		<string>if</string>
		<string>in</string>
		<string>is</string>
		<string>isa</string>
		<string>not</string>
		<string>or</string>
		<string>pass</string>
		<string>return</string>
		<string>try</string>
		<string>while</string>
		<string>yield</string>
		<string>abstract</string>
		<string>callable</string>
		<string>internal</string>
		<string>self</string>
		<string>AST</string>
		<string>cast</string>
		<string>constructor</string>
		<string>destructor</string>
		<string>do</string>
		<string>ensure</string>
		<string>enum</string>
		<string>event</string>
		<string>failure</string>
		<string>false</string>
		<string>get</string>
		<string>given</string>
		<string>goto</string>
		<string>interface</string>
		<string>null</string>
		<string>of</string>
		<string>otherwise</string>
		<string>override</string>
		<string>namespace</string>
		<string>partial</string>
		<string>public</string>
		<string>protected</string>
		<string>private</string>
		<string>ref</string>
		<string>retry</string>
		<string>return</string>
		<string>struct</string>
		<string>success</string>
		<string>transient</string>
		<string>typeof</string>
		<string>virtual</string>
		<string>when</string>
		<string>yield</string>
		<string>true</string>
		<string>unless</string>
	</array>
	<key>keywordsCaseSensitive</key>
	<true/>
	<key>recolourKeywordIfAlreadyColoured</key>
	<true/>
	<key>removeFromFunction</key>
	<string>def </string>
	<key>secondSingleLineComment</key>
	<string>//</string>
	<key>secondString</key>
	<string>'</string>
</dict>
</plist>
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox