Snippets Converter

Convert TextMate Snippets into Gedit, NetBeans and Ruble (Aptana Studio/RadRails 3) snippets.

Install the gem

sudo gem install snippets_converter

How to use (for Ubuntu and Ruby snippets)

  • Open a terminal and go in your TextMate Bundle directory. Then run

snippets_converter netbeans|gedit|ruble

This will convert all your Snippets in a XML file into the “out” folder of your current directory.

Gedit

  • Put the <language>.xml file into

/home/username/.gnome2/gedit/snippets

If you used GMate (github.com/gmate/gmate)

  • Open your <language>.xml file and check if the “language” attribute of “snippets” tag is correct

<snippets language="rubyonrails">

NetBeans

  • Put the org-netbeans-modules-editor-settings-CustomCodeTemplates.xml file into

/home/username/.netbeans/6.9/config/Editors/text/x-ruby/CodeTemplates

Ruble (Aptana Studio/RadRails 3)

  • Put the <language>_snippets.rb file into

/home/username/Documents/Aptana Rubles/my_ruble.ruble/snippets
  • Open your <language>_snippets.rb file and check if the value of “scope” is correct

with_defaults :scope => "source.ruby" do |bundle|

More info at radrails.tenderapp.com/faqs/radrails-3/ruble-programming-guide

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but

    bump version in a commit by itself I can ignore when I pull)
    
  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 Nicolas Alpi

Copyright © 2011 Nowhere Man. See LICENSE for details.