paniwani
paniwani

Reputation: 649

Erroneous Textmate hash pair completion when using new hash syntax in Rails

When trying to use the new hash syntax in Ruby 1.9.2 in a Ruby on Rails project, Textmate erroneously autocompletes the hash pair. For example,

title:    "My Book Title"

turns into

title:key => "value",

when pressing tab after the colon. How do I stop this functionality? I'm new to Textmate.

Upvotes: 0

Views: 224

Answers (1)

Martin Gordon
Martin Gordon

Reputation: 36389

This is likely due to the fact that the Ruby bundle you are running hasn't been updated for 1.9. You can fix this by going into the Bundle Editor (Bundles > Bundle Editor > Show Bundle Editor), finding Ruby and then change the Hash Pair – :key => "value" Snippet to:

${1:key}: ${2:"${3:value}"}${4:, }

(It might help to select "Snippets" from the Combo Box above the list.)

From: http://www.strictlyuntyped.com/2010/12/new-ruby-19-hash-syntax.html

Upvotes: 1

Related Questions