Skip to content

Instantly share code, notes, and snippets.

@ptitfred
Created August 20, 2012 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptitfred/3403439 to your computer and use it in GitHub Desktop.
Save ptitfred/3403439 to your computer and use it in GitHub Desktop.
Ruby VIM configuration
" F9 key will trigger syntax validation
autocmd FileType ruby map <F9> :w<CR>:!ruby -c %<CR>
" Edition configuration (tabs=2spaces & autoindent)
fun! SetupRuby()
set shiftwidth=2
set softtabstop=2
set expandtab
set autoindent
endfun
au BufNewFile,BufRead *.rb call SetupRuby()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment