Does Textmate have a shortcut for hash? i.e. => it's such a pain to type!
Does textmate have a shortcut for hash? i.e. => it's su开发者_Python百科ch a pain to type!
What about smart snippets where you can create a code block with replacement variables, and it cycles through the replacement variables to quickly modify the code template?
Any good links on using textmate with rails to code faster? tips/tricks etc.
We have an alternative hash syntax in Ruby 1.9:
# old way that still works in Ruby 1.9
my_hash = { :a => 'apple', :b => 'banana' }
# new way
my_hash = { a: 'apple', b: 'banana' }
Since this is being voted up, I'm adding Josiah Kiehl's comment
Note that you can't do anything but symbol keys with this method. ie: {someobject => 'value', 'string' => 'value', 123 => 'value'}
1) Use crtl + L
2) Look under the Bundles > Ruby or Bundles > Ruby on Rails menus. There's all sorts of stuff there.
精彩评论