Permalink
Browse files

Added some minimal RDoc support.

Also tiny change to the bundle syntax, added matching of "block_given?".

git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle@3799 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
cskiadas
cskiadas committed Jun 25, 2006
1 parent 4513caa commit 41e8d464ab62e6255949640d3ab54a605cb65475
@@ -0,0 +1,33 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+s = STDIN.read
+case s
+when /^\w+$/
+ print "*#{s}*$0"
+when ""
+ print "*$1*$0"
+else
+ print "&lt;b&gt;#{s}&lt;/b&gt;"
+end</string>
+ <key>fallbackInput</key>
+ <string>word</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>^*</string>
+ <key>name</key>
+ <string>Enclose in * (RDoc comments)</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.ruby comment</string>
+ <key>uuid</key>
+ <string>931DD73E-615E-476E-9B0D-8341023AE730</string>
+</dict>
+</plist>
@@ -0,0 +1,33 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+s = STDIN.read
+case s
+when /^\w+$/
+ print "+#{s}+$0"
+when ""
+ print "+$1+$0"
+else
+ print "&lt;tt&gt;#{s}&lt;/tt&gt;"
+end</string>
+ <key>fallbackInput</key>
+ <string>word</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>^+</string>
+ <key>name</key>
+ <string>Enclose in + (RDoc comments)</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.ruby comment</string>
+ <key>uuid</key>
+ <string>2DDB6FE0-6111-4C40-A149-8E67E76F8272</string>
+</dict>
+</plist>
@@ -0,0 +1,33 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+s = STDIN.read
+case s
+when /^\w+$/
+ print "_#{s}_$0"
+when ""
+ print "_$1_$0"
+else
+ print "&lt;em&gt;#{s}&lt;/em&gt;"
+end</string>
+ <key>fallbackInput</key>
+ <string>word</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>^_</string>
+ <key>name</key>
+ <string>Enclose in _ (RDoc comments)</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.ruby comment</string>
+ <key>uuid</key>
+ <string>DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE</string>
+</dict>
+</plist>
@@ -0,0 +1,31 @@
+<?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>beforeRunningCommand</key>
+ <string>nop</string>
+ <key>command</key>
+ <string>#!/usr/bin/env ruby
+s = STDIN.read
+puts "\#--"
+if s== ""
+ puts "\# $0","\#++"
+else
+ puts s, "\#++", "$0"
+end</string>
+ <key>fallbackInput</key>
+ <string>line</string>
+ <key>input</key>
+ <string>selection</string>
+ <key>keyEquivalent</key>
+ <string>^~O</string>
+ <key>name</key>
+ <string>Omit from RDoc</string>
+ <key>output</key>
+ <string>insertAsSnippet</string>
+ <key>scope</key>
+ <string>source.ruby</string>
+ <key>uuid</key>
+ <string>BF4CA9F1-51CD-48D4-8357-852234F59046</string>
+</dict>
+</plist>
@@ -0,0 +1,16 @@
+<?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>content</key>
+ <string> :yields: ${0:arguments}</string>
+ <key>name</key>
+ <string>:yields: RDoc comment</string>
+ <key>scope</key>
+ <string>source.ruby comment</string>
+ <key>tabTrigger</key>
+ <string>y</string>
+ <key>uuid</key>
+ <string>ED6368FB-A11D-4622-9F42-7879481094F1</string>
+</dict>
+</plist>
@@ -0,0 +1,18 @@
+<?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>content</key>
+ <string>=begin rdoc
+ $0
+=end</string>
+ <key>name</key>
+ <string>RDoc documentation block</string>
+ <key>scope</key>
+ <string>source.ruby</string>
+ <key>tabTrigger</key>
+ <string>=b</string>
+ <key>uuid</key>
+ <string>05984208-D559-4C04-A69C-2019361A985A</string>
+</dict>
+</plist>
View
@@ -147,7 +147,7 @@
<key>comment</key>
<string> just as above but being not a logical operation</string>
<key>match</key>
- <string>(?&lt;!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?</string>
+ <string>(?&lt;!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?</string>
<key>name</key>
<string>keyword.control.pseudo-method.ruby</string>
</dict>
View
@@ -49,6 +49,7 @@
<string>D94AD09E-ADF4-47C9-8236-C7B38B44804E</string>
<string>803A6BDF-D74A-4B69-AFF0-98B824AB478D</string>
<string>2765038A-1CFC-4BBD-B19C-6EB2B400D528</string>
+ <string>6EA7AE06-3EA9-497D-A6DE-732DE43DA6E9</string>
</array>
<key>submenus</key>
<dict>
@@ -102,6 +103,20 @@
<key>name</key>
<string>Arrays</string>
</dict>
+ <key>6EA7AE06-3EA9-497D-A6DE-732DE43DA6E9</key>
+ <dict>
+ <key>items</key>
+ <array>
+ <string>ED6368FB-A11D-4622-9F42-7879481094F1</string>
+ <string>05984208-D559-4C04-A69C-2019361A985A</string>
+ <string>BF4CA9F1-51CD-48D4-8357-852234F59046</string>
+ <string>931DD73E-615E-476E-9B0D-8341023AE730</string>
+ <string>DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE</string>
+ <string>2DDB6FE0-6111-4C40-A149-8E67E76F8272</string>
+ </array>
+ <key>name</key>
+ <string>RDoc</string>
+ </dict>
<key>803A6BDF-D74A-4B69-AFF0-98B824AB478D</key>
<dict>
<key>items</key>
@@ -350,6 +365,12 @@
<string>Ruby</string>
<key>ordering</key>
<array>
+ <string>ED6368FB-A11D-4622-9F42-7879481094F1</string>
+ <string>05984208-D559-4C04-A69C-2019361A985A</string>
+ <string>BF4CA9F1-51CD-48D4-8357-852234F59046</string>
+ <string>931DD73E-615E-476E-9B0D-8341023AE730</string>
+ <string>DAA69A0C-FC1E-4509-9931-DFFB38B4D6AE</string>
+ <string>2DDB6FE0-6111-4C40-A149-8E67E76F8272</string>
<string>35222962-C50D-4D58-A6AE-71E7AD980BE4</string>
<string>8C102BE9-6E49-11D9-A933-000D93589AF6</string>
<string>5289EE40-86B8-11D9-A8D4-000A95E13C98</string>
@@ -516,6 +537,7 @@
<string>49D69DEC-6991-49F4-8D9B-BA60BFDD3D17</string>
<string>97054C4D-E4A3-45B1-9C00-B82DBCB30CAD</string>
<string>FD010022-E0E7-44DB-827F-33F7D9310DA2</string>
+ <string>87FBBDCF-BFD1-44BE-91BD-B9494BC56274</string>
</array>
<key>uuid</key>
<string>467B298F-6227-11D9-BFB1-000D93589AF6</string>

0 comments on commit 41e8d46

Please sign in to comment.