If you position cursor over the method and hit CTRL+] it will take you into the method.
CTRL-T will take you back from that method.
CTRL-I and CTRL-O will take you In and Out from the method.
Starting this upcoming month I’ll be a paid blogger. One of the requirements is word count. Add the following to your .vimrc file to calculate your current word count on *Posix systems such as Linux/Mac.
nmap <silent> <leader>w :w !echo Word Count: `wc -w`<CR>
If your leader key is the backslash key then in normal mode you can press \w to run the command and see you current buffer’s word count.
In visual mode whatever you highlight can be lower cased with u. Also you can toggle the case of what you’ve highlighted with ~. I like to use tilda after highlighting a column of lined up text.
g; goes back to the location of the last edit. This is “pick up where I left off before going somewhere else”. It’s gold. But that’s not all — it keeps track of your edit history so that you can go back five edits ago. And g, moves you back forward in the edit history.
Today I learned :j will merge the line below to the current line at the end with a proper space between. So if your cursor is at the beginning of line one in normal mode and you enter :j and hit enter then line two gets appended to the end.
New gem released! read_source This gem has a VIM feature which will let you open any Ruby method (written in Ruby) directly into VIM! You can do this without interupting your irb session or Ruby process if you start a VIM session with the --servername flag. Now you can learn the code you’re working with much more quickly!