Vim: Setting different indentation for Ruby files

Adding this to .vimrc file should result in shift-width set to two when editing ruby files:


autocmd FileType ruby setlocal sw=2