Tell TextMate About Your RJS Templates

As explanations go, it doesn’t get much more straightforward than Cody Fauser’s excellent post on Rails RJS Templates. When you try it out though, you may notice that TextMate doesn’t know that RJS templates which by convention have an “.rjs” suffix, are really Ruby code. If you want to make TextMate aware of the “.rjs” suffix simply open the Bundle Editor window, navigate to the Ruby bundle, scroll down to the Ruby language definition (it has a Gray circular icon with an “L” on it), and add ‘rjs’ to the list of fileTypes.

add-rjs-to-ruby-bundle1

Once you do that, TextMate will treat .rjs files like other Ruby files and you’ll get syntax highlighting and stuff.

About these ads
This entry was posted in AJAX, RJS templates, Ruby on Rails, TextMate. Bookmark the permalink.

3 Responses to Tell TextMate About Your RJS Templates

  1. Pingback: 16 RJS Resources and Tutorials for Rails Programmers

  2. Gustavo Delfino says:

    The image is broken!

  3. bburcham says:

    Oh thanks Gustavo. I fixed it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s