abautista
1/9/2015 - 8:16 PM

vim.md

vim cheat sheet

essential folding commands

zi          switch folding on or off
za          toggle current fold open/closed
zc          close current fold
zR          open all folds
zM          close all folds 

vim ruby

ruby motions

]m          Go to start of next method definition.
]M          Go to end of next method definition.
[m          Go to start of previous method definition.
[M          Go to end of previous method definition.

ruby text objects

am          "a method", select from "def" until matching "end" keyword.
im          "inner method", select contents of "def"/"end" block.
aM          "a class", select from "class" until matching "end keyword".
iM          "inner class", select contents of "class"/"end" block.