Software dev, tech, mind hacks and the occasional personal bit

_vimrc for Ruby

In the past I’ve used gvim for Ruby coding. It’s been pretty good, especially with the new tabbed editing and omni complete (bit like intellisense in Visual Studio) introduced in vim 7. However, when I downloaded vim at work, I was missing the secret sauce – a good vimrc. Here’s my usual vimrc for ruby:

set nocompatible
behave xtermset
set nu
set tabstop=2
set shiftwidth=2
set softtabstop=2
set ai
set columns=100
set lines=70
set guifont=Courier:h10
set expandtab
set smarttab
let g:rubycomplete_rails = 1

Among other things, it makes the default window size bigger, uses a prettier font, sets up auto indenting ruby style, and turns on omni-complete.

By the way, on windows, assuming a default install, vimrc is to be found here:

C:\\Program Files\\Vim\\_vimrc


JRuby Setup


Mango Liqueur

1 Comment

  1. alvin

    can you explain the _vimrc line by line for me please

    my email is [email protected]

Powered by WordPress & Theme by Anders Norén