Skip to content

Commit

Permalink
Added ruby support to vim config
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Dec 21, 2012
1 parent 3c093ed commit ae0df1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .vim/ftplugin/ruby.vim
Original file line number Original file line Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .vimrc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Bundle 'ervandew/supertab'
Bundle 'groenewege/vim-less' Bundle 'groenewege/vim-less'
Bundle 'jcf/vim-latex' Bundle 'jcf/vim-latex'
Bundle 'davidhalter/jedi-vim' Bundle 'davidhalter/jedi-vim'
Bundle 'rubycomplete.vim'


" Re-enable filetype plugin " Re-enable filetype plugin
filetype indent plugin on filetype indent plugin on
Expand Down Expand Up @@ -112,6 +113,10 @@ let g:flake8_max_line_length="99"


" Configure tab completion " Configure tab completion
au FileType python set omnifunc=jedi#complete 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" let g:SuperTabDefaultCompletionType = "context"
set completeopt=menuone,preview set completeopt=menuone,preview


Expand Down

0 comments on commit ae0df1e

Please sign in to comment.