From 0651c14677c185126ae9d0ad6fb9762f231fcc25 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Fri, 2 Apr 2010 22:27:56 -0700 Subject: [PATCH] vim: Add ruby indentation files --- .vim/ftdetect/ruby.vim | 29 +++++++++++++++++++++++++++++ .vim/indent/ruby.vim | 23 +++++++++++++++++++++++ 2 files changed, 52 insertions(+), 0 deletions(-) create mode 100644 .vim/ftdetect/ruby.vim create mode 100644 .vim/indent/ruby.vim diff --git a/.vim/ftdetect/ruby.vim b/.vim/ftdetect/ruby.vim new file mode 100644 index 0000000..dab1d32 --- /dev/null +++ b/.vim/ftdetect/ruby.vim @@ -0,0 +1,29 @@ +" Ruby +au BufNewFile,BufRead *.rb,*.rbw,*.gem,*.gemspec set filetype=ruby + +" Ruby on Rails +au BufNewFile,BufRead *.builder,*.rxml,*.rjs set filetype=ruby + +" Rakefile +au BufNewFile,BufRead [rR]akefile,*.rake set filetype=ruby + +" Rantfile +au BufNewFile,BufRead [rR]antfile,*.rant set filetype=ruby + +" IRB config +au BufNewFile,BufRead .irbrc,irbrc set filetype=ruby + +" Rackup +au BufNewFile,BufRead *.ru set filetype=ruby + +" Capistrano +au BufNewFile,BufRead Capfile set filetype=ruby + +" Bundler +au BufNewFile,BufRead Gemfile set filetype=ruby + +" Autotest +au BufNewFile,BufRead .autotest set filetype=ruby + +" eRuby +au BufNewFile,BufRead *.erb,*.rhtml set filetype=eruby diff --git a/.vim/indent/ruby.vim b/.vim/indent/ruby.vim new file mode 100644 index 0000000..5091c64 --- /dev/null +++ b/.vim/indent/ruby.vim @@ -0,0 +1,23 @@ +" Vim indent file +" Language: Ruby +" Maintainer: Nikolai Weibull +" Info: $Id: ruby.vim,v 1.47 2008/06/29 04:18:43 tpope Exp $ +" URL: http://vim-ruby.rubyforge.org +" Anon CVS: See above site +" Release Coordinator: Doug Kearns + +" 0. Initialization {{{1 +" ================= + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +source $VIMRUNTIME/indent/ruby.vim +let b:did_indent = 1 + +set sw=2 +set ts=2 +set et +set tw=100 -- 1.6.6.rc1.39.g9a42