http://www.codeulatescreencasts.com/products/vim-for-rails-developers
- Rfind (w/ tab completion)
- gf (go to file under cursor)
- Runittest Rcontroller Rfunctionaltest
- RVunittest (vertical split)
- RSunittest (horizontal split)
- RTunittest (new tab)
- Rake (run tests)
- Rgenerate migration add_foo_to_bar
- def + tab (new method): set method name, hit tab again
- sel + tab, map + tab
- .vim/bundle/snipmate.vim/snippets/ruby.snippets
- New snippets in .vim/snippets
- <C-X>= foo<%= ^ %>
- <C-X>+ <%= foo^ %>
- <C-X>- foo<% ^ %>
- <C-X>_ <% foo^ %>
- <C-X>' foo<%# ^ %>
- <C-X>" <%# foo^ %>
- <C-X><Space> <foo>^</foo>
- <C-X><CR> <foo>\n^\n</foo>
- <C-X>/ Last HTML tag closed
- <C-X>@ <link rel="stylesheet" ...>
- <C-X># <meta http-equiv="Content-Type" ... />
- <C-X>$ <script src="/javascripts/^.js"></script>
- Install w/ homebrew, default is crap
- Had to change path to get HB version first
- ctags -R --exclude=.git --exclude=log --exclude=tmp *
- set tags=./tags
- ctrl + ] (jump to definition)
- tag /validates_presence_.* (enter number to jump) ((doesn't work as expected))
- ack --ruby controller
- .ackrc w/ --ignore-dir=rails (ignore rails directory)
- set grepprg=ack, then grep --ruby controller
- :cn (next result), :cp (prev result)
- ci" change inside double quotes
- da" delete around double quotes
- daw delete around word (delete whole word)
- gi go to where you were last inserting
- ctrl + o go back one jump
- ctrl + i go forward one jump
- https://github.com/r00k/dotfiles (git blame macro)
- tComment - another comment option