Skip to content
Vim setup with special focus on Ruby/Rails development, with the ability to quickly get latest on all your plugins.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Ruby/Rails based vimfiles and installer

With the support for ruby, git, rvm, rails, rspec and so on.


Vim 7.3 or better Tested on MacOS and Linux

Introduction to Vim:

Quick Install

curl -o - | sh

If you want to add another plugin, just edit the plugins.yml file and add the name & url of the source control of the plugin.

Basic Mappings

The leader is mapped to ,

Esc is mapped to jj

In Normal mode (Esc or jj)

,w - Save all buffers and place the cursor back to sameplace.

,W - Save all buffers and place the cursor back to sameplace.

,n - File browser (NerdTree Toggle)

,/ - File browser (NERDTree Find)

Space - Page Down

Shift + Space - Page Down

Ctrl + Shift + Right - Goto Next buffer

Ctrl + Shift + Left - Goto Previous buffer

,a - Search in files (Ack)

,f - Search open buffers (Fuzzy Finder like Textmate)

,d - close buffer

,D - close all buffers

,u - GUI Undo history (GUndo) (Needs Python version more than 2.4v)

,, - Toggle between last two buffers

Open/Edit files

,ew - Open/Edit file in the current directory

,es - Open/Edit file in HORIZONTAL SPLIT

,ev - Open/Edit file in VERTICAL SPLIT

,et - Open/Edit file in NEW TAB

Execute Ruby Specs

,s - Run one spec under the cursor

,S - Run all specs in the current file

,- - Rerun last rake command (most likely the last run spec)

In Insert mode (i)

jj - Back to normal mode(or ESC) #

uu - Replaces with the charecter -

hh - Replaces with the charecter =>

aa - Replaces with the charecter @

<tab> - auto complete or expand snippet

See .vimrc for more.


ruby (F5)

F5 Executes the current file.


So many good stuff - get to know this plugin!

,m - Jump to model

,v - Jump to view

,c - Jump to controller

Test Ruby Specs

,s - Performs .Rake from rails plugin => normal .rake

,S - Performs Rake from rails plugin => normal rake

,- - Perform Rake - from rails plugin => normal rake -

:help rails


CoffeeScript support

`:CoffeeCompile watch` show compiled js in split


Provides text-objects for Ruby blocks

`var` (visual around Ruby)

`vir` (visual inner Ruby)

`ar` / `ir` (expand/contract selection)

`cir` (change inner Ruby)

`dar` (delete around Ruby)

sparkup (ctrl+e)

Expand CSS selectors div.event in to markup <div class='event'></div>


Git integration

,gd - Git diff

,gs - Git status press - to stage file

,gw - Git write

,ga - Git add

,gb - Git blame

,gco - Git checkout

,gci - Git commit

,gm - Git move

,gr - Git remove

:help fugitive

snippets usage (TAB)

Snippets, press TAB to expand

Examples (in a Ruby file):





gundo (,u)

Navigate changes history tree


Terminal/Interactive programs

:Conque zsh

:Conque ls

Note you can also drop back to the terminal using Ctrl+Z, to get back to Vim with %1. This is not a feature of Conque.


Shows history of yanked (copied) text

Pressing ctrl + p will also cycle through paste history

ack (,a)

Search project for text (aka find in files)

,a word

,a "some words"

nerdtree (,n)

Project file browser

,n opens file browser

o / x open and close files/folders

m menu to move/delete/copy files/folders

? Help

I use nerdtree for creating or moving files, but find command-t quicker for opening files.

surround (ys/cs/ds)

Allows adding/removing/changing of surroundings

I would highly recommend getting to know this plugin, it is very useful. Especially when you grok text objects.


ysiw) - surround inner word with ()

ysiw( - surround inner word with ( )

In the above example iw can be replaced with any text object or motion.

If you find yourself manually adding surroundings, stop and work out the correct text object or motion.

cs"' - change surrounding from " to '

ds - delete surrounding

Install these vimfiles manually

Note: You will already have a ~/.vim folder, either delete or move it.

cp -r ~/.vim ~/.vim.old 2>/dev/null
rm -fr ~/.vim 2>/dev/null
rm -f ~/.vimrc 2>/dev/null
git clone ~/.vim && cd ~/.vim && rake update

or run:

curl -o - | sh

To update to the latest vimfiles

cd ~/.vim
rake preinstall

Install Dependacies


brew install ack
brew install ctags

Note: MacOS comes with the BSD version of ctags which is not compatible.


sudo apt-get install exuberant-ctags
sudo apt-get install ack-grep
sudo ln -s /usr/bin/ack-grep /usr/local/bin/ack
You can’t perform that action at this time.