Life changing vim tricks

I've been learning a lot of vim lately, and honestly I'm very addicted. Here are some tricks I've learned today.

(Note that by default vim is set to use \ as )

Run rspec right from vim.

Press t and all rspec specs will be run

map <Leader>t :w\|!rspec spec<cr>

Run rackup directly from vim

Press r and rackup will launch

map <Leader>r :w\|!rackup<cr>

Temporarily switch out of vim back to the console

To suspend vim and switch to the console:(C = Control)


To switch back to vim when you're done, type: