TextMate Cheat Sheet for Rails Hackers ⌃ = control
⌘ = command
File Navigation
⌥ = option
Snippets
⇧ = shift ⌃⌥⌘S
go to file
⌘T
Tab Trigger
go to line
⌘L
class class_name class def def method_name each { |element| ... } each forin for element in collection if condition if or ifelse unless condition unless : :key => "value" flash[:notice] = "..." flash logi logger.info "..." ae assert_equal value, @o.attr redirect_to options rec[ai] render :action => "action" ra rp[loc] render :partial => "item" create_table "table" ... mct mcc table.column : , : lic[ai] <%= link_to options ... <% for item in @items ... eforin ft <%= form_tag options ... has_many :objects ... hm belongs_to :object ... bt vpif validates_presence_of :attr ...
go to method
⇧⌘T
find in project reveal in project
⇧⌘F ⌃⌘R
Editing code completion fold / unfold comment selection
Escape F1 ⌘/
indent selection
⌘ [ and ⌘ ]
move selection edit selection
⌃ ⌘ (arrow)
column selection insert tag
⌥⌘A ⌥ (drag) ⌃⇧<
⌃⇧W wrap selection in tag close tag ⌥⌘. wrap selection as link ⌃ ⇧ L ⌃⇧A subversion menu name ⇧ ↩ new method
Hot Key
Commands
⌃⌥⌘C
run file as ruby
⌘R
start irb
Need Rails Training? http://pragmaticstudio.com
⌃⇧I
=> params[:id] session[:user] <% %> <%= %>
⌃L ⌃P ⌃J ⌃X ⌃Z Copyright © Mike Clark Updated: 4/29/06