Enrich your RDoc authoring experience.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 5 commits behind joshaven:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Commands
Syntaxes
support/bin
LICENSE
README.rdoc
info.plist

README.rdoc

RDoc.tmbundle

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.

Installation

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'

Optional Customization of your Ruby.tmbundle

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

Credits

  • 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

Notes

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

Copyright © 2009 Joshaven Potter. See LICENSE for the MIT License details.