Enrich your RDoc authoring experience. Installing this TextMate bundle will teach textmate how to properly display RDoc in the preview. For example, if you have a README.rdoc you can press <Control> + <Option> + <CMD> + <p> to preview the html output.
-
Code Repository: github.com/joshaven/RDoc.tmbundle
-
Joshaven Potter: yourtech@gmail.com
git clone git://github.com/joshaven/RDoc.tmbundle.git ~/Library/Application\ Support/TextMate/Bundles/RDoc.tmbundle
You will want to run the following line to reload the bundles if TextMate was open during the install…
osascript -e 'tell app "TextMate" to reload bundles'
Take things one step further by launching your app’s RDocs from any .rb file: The following will setup TextMate to regenerate the rdocs and open them in Safari when you press Ctrl+Opt+CMD+p from any .rb file.
-
Edit the bundles within TextMate Ctrl+Opt+CMD+b
-
Choose the “Run” command from the “Ruby” bundle and click the copy button (double plus sign)
-
Type “Preview” to rename what is currently called “Run copy”
-
Replace the context with the following in the text area on the right labeled: Command(s)
#!/bin/bash --posix rake rdoc osascript -e "tell application \"Safari\" to open location \"file:///$TM_PROJECT_DIRECTORY/rdoc/index.html\""
-
Click on the Action Key Equivalent setting section and set as Ctrl+Opt+CMD+p
-
Close the bundle editor and choose Bundles > Bundle Editor > Reload Bundles
-
Enjoy faster access to your RDocs
-
Thank you Jason Noble for your simple approach to previewing in TextMate. tinyurl.com/yea3p38
-
Thank you Elia Schito for your addition of a RDoc help file: CMD+Shift+H github.com/elia
-
Thank you vguerci for Ruby 1.9 Support. github.com/vguerci
Currently, this RDoc TextMate bundle only provides a method of previewing.
Maybe I’ll get around to syntax highlighting, or maybe you will… Contact me and I’ll be happy to incorporate your changes.
Copyright © 2009 Joshaven Potter. See LICENSE for the MIT License details.