Dr Nic

TextMate bundles for Merb

If you are using TextMate (OS X) or E Text Editor (Windows) then you’ll be dead keen to know there is a TextMate bundle for Merb, and another one for Datamapper.

[This is cross-posted on the new Merbunity community site for Merb]

Currently, you can access the bundles via git:

cd "~/Library/Application Support/TextMate/Bundles"
git clone git://github.com/drnic/datamapper-tmbundle.git Datamapper.tmbundle
git clone git://github.com/drnic/merb-tmbundle.git Merb.tmbundle

Now “Reload Bundles” or restart TextMate.

You can now select from three Merb syntax/scopes. Press Shift+Alt+Cmd+M to see the options (below)

Merb TextMate bundle - select ORM

  • If you select Merb (Datamapper) you will have access to the Merb bundle AND the Datamapper bundle.
  • If you select Merb (ActiveRecord) you have access to the Merb bundle AND the Ruby on Rails bundle.
  • If you select Merb (Sequel) then nothing special happens as there isn’t a Sequel bundle yet. Want to create one?

Currently there is no separation in the Rails bundle for ActiveRecord and non-ActiveRecord snippets and commands, so if you use Merb (ActiveRecord) there will be some snippets + commands that you don’t want from Rails. In future, there may be more separation to help the Merb bundle. Also, TextMate 2 may help this cause.

As always, to learn what snippets are available at any given cursor position, use Ctrl+Cmd+T.

If you have new snippets for any of the bundles, I suggest forking the git repositories, pushing up the changes to github and sending Pull Requests to me (drnic).

Sponsored by Engine Yard

The initial development of this bundle was sponsored by Engine Yard because they care.

Rails bundle

There is also the hughly popular Ruby on Rails bundle for TextMate that you can use. Download from http://railsbundle.com/ or via github.

If you want to learn everything about the new Ruby on Rails bundle for TextMate and daily life with TextMate (short cuts, editing bundles) then I highly recommend the new TextMate for Rails 2 Peepcode:

TextMate for Rails 2

This recommendation comes from inside information on the quality of the Peepcode… it was written by me, and incorporates the vocal skills of the operatic Geoffrey Grosenbach.

Related posts:

  1. Packaging TextMate bundles in OS X DMGs Last week Engine Yard released a CLI for their Engine...
  2. Validate and Save your Ruby in TextMate – with secret Rubinus superpowers In some TextMate bundles, if you save a file it...
  3. TextMate easter egg: find bundle commands by key combo I’ve dreamed of the ability to ask TextMate “what frigging...
  4. My attempt at sake task management I’ve used sake intermittently in my workflow. It competes...
  5. Using Ruby within TextMate snippets and commands I didn’t know you could run Ruby within TextMate snippets....

7 Responses to “TextMate bundles for Merb”

  1. [...] TextMate Bundles for Merb – News from Dr. Nic. [...]

  2. a says:

    What font are you using in the textmate view?

  3. Dr Nic says:

    @a – Inconsolata 18pt.

  4. Maxime says:

    Really big thanks Dr Nic!

  5. merb says:

    [...] three merb syntax/scopes. … In future, there may be more separation to help the merb bundle. …http://drnicwilliams.com/2008/05/12/textmate-bundles-for-merb/Merb Looking for a hacker&aposs framework?A light and powerful Ruby MVC web framework … Built for [...]

  6. [...] recorded first by clx on 2008-08-15→ TextMate bundles for Merb [...]