Skip to content

Instantly share code, notes, and snippets.

@jguice
Last active September 28, 2017 00:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jguice/543391b6d372adbbe426 to your computer and use it in GitHub Desktop.
Save jguice/543391b6d372adbbe426 to your computer and use it in GitHub Desktop.
Rakefile language definition file (Textmate/Sublime Text)
<?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>rake</string>
<string>Rakefile</string>
</array>
<key>foldingStartMarker</key>
<string>(?x)^
(\s*+
(module|class|def
|unless|if
|case
|begin
|for|while|until
|^=begin
|( "(\\.|[^"])*+" # eat a double quoted string
| '(\\.|[^'])*+' # eat a single quoted string
| [^#"'] # eat all but comments and strings
)*
( \s (do|begin|case)
| (?&lt;!\$)[-+=&amp;|*/~%^&lt;&gt;~] \s*+ (if|unless)
)
)\b
(?! [^;]*+ ; .*? \bend\b )
|( "(\\.|[^"])*+" # eat a double quoted string
| '(\\.|[^'])*+' # eat a single quoted string
| [^#"'] # eat all but comments and strings
)*
( \{ (?! [^}]*+ \} )
| \[ (?! [^\]]*+ \] )
)
).*$
| [#] .*? \(fold\) \s*+ $ # Sune’s special marker
</string>
<key>foldingStopMarker</key>
<string>(?x)
( (^|;) \s*+ end \s*+ ([#].*)? $
| (^|;) \s*+ end \. .* $
| ^ \s*+ [}\]] \s*+ ([#].*)? $
| [#] .*? \(end\) \s*+ $ # Sune’s special marker
| ^=end
)</string>
<key>keyEquivalent</key>
<string>^~R</string>
<key>name</key>
<string>Rakefile</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>namespace</string>
<key>end</key>
<string>(do|{)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.ruby</string>
</dict>
</dict>
<key>name</key>
<string>source.ruby.rakefile.namespace</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>task</string>
<key>end</key>
<string>(do)|({)|($)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.ruby</string>
</dict>
</dict>
<key>name</key>
<string>source.ruby.rakefile.task</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.ruby</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>source.ruby</string>
</dict>
</array>
<key>scopeName</key>
<string>source.ruby.rakefile</string>
<key>uuid</key>
<string>FD861164-D42D-43B7-8F3B-8DBFB3963B66</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment