Skip to content

Commit

Permalink
set Rails style indentation when inside rails
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jul 28, 2016
1 parent 98c26fd commit ce9614e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ set nocompatible

function! SetRailsEnv()
let l:path = getcwd()
let g:ruby_indent_access_modifier_style="normal"
if match(l:path, "rails\$") > 0
if filewritable(l:path . "/activesupport") == 2
if match(&path, "activesupport") < 0
let &path = "activesupport/lib,actionpack/lib,activerecord/lib," . &path
endif
compiler minitest
let g:ruby_indent_access_modifier_style="indent"
endif
endif
endfunction
Expand Down

0 comments on commit ce9614e

Please sign in to comment.