Permalink
Browse files

Added ruby support to vim config

  • Loading branch information...
dbrgn committed Dec 21, 2012
1 parent 3c093ed commit ae0df1e22b9940d41c9b34de4eb25ea5ed52cde3
Showing with 21 additions and 0 deletions.
  1. +16 −0 .vim/ftplugin/ruby.vim
  2. +5 −0 .vimrc
View
@@ -0,0 +1,16 @@
+" Tab key configuration (use real double 2 spaces)
+set tabstop=2
+set shiftwidth=2
+set softtabstop=2
+set expandtab
+
+" Override ruby-vim textwidth
+set textwidth=80
+
+" Highlight the 100th column
+if exists('+colorcolumn')
+ set colorcolumn=100
+else
+ highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
+ match OverLength /\%>80v.\+/
+endif
View
5 .vimrc
@@ -25,6 +25,7 @@ Bundle 'ervandew/supertab'
Bundle 'groenewege/vim-less'
Bundle 'jcf/vim-latex'
Bundle 'davidhalter/jedi-vim'
+Bundle 'rubycomplete.vim'
" Re-enable filetype plugin
filetype indent plugin on
@@ -112,6 +113,10 @@ let g:flake8_max_line_length="99"
" Configure tab completion
au FileType python set omnifunc=jedi#complete
+au FileType ruby,eruby set omnifunc=rubycomplete#Complete
+au FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
+au FileType ruby,eruby let g:rubycomplete_rails = 1
+au FileType ruby,eruby let g:rubycomplete_classes_in_global = 1
let g:SuperTabDefaultCompletionType = "context"
set completeopt=menuone,preview

0 comments on commit ae0df1e

Please sign in to comment.