Skip to content

joshaven/RDoc.tmbundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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 © 2009 Joshaven Potter. See LICENSE for the MIT License details.

About

Enrich your RDoc authoring experience.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages