Skip to content

Commit

Permalink
Revert "Option to control hanging indent"
Browse files Browse the repository at this point in the history
This reverts commit e993d18.

Conflicts:

	indent/ruby.vim
  • Loading branch information
AndrewRadev committed Sep 18, 2011
1 parent e85a87e commit 043f4ab
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions indent/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ if exists("*GetRubyIndent")
finish
endif

" Set up some defaults.
if !exists('g:ruby_hanging_indent')
let g:ruby_hanging_indent = 1
endif

let s:cpo_save = &cpo
set cpo&vim

Expand Down Expand Up @@ -278,8 +273,7 @@ function GetRubyIndent(...)
\ s:end_skip_expr) > 0
let line = getline('.')
if strpart(line, 0, col('.') - 1) =~ '=\s*$' &&
\ strpart(line, col('.') - 1, 2) !~ 'do' &&
\ g:ruby_hanging_indent
\ strpart(line, col('.') - 1, 2) !~ 'do'
let ind = virtcol('.') - 1
else
let ind = indent('.')
Expand Down Expand Up @@ -358,12 +352,7 @@ function GetRubyIndent(...)
let col = s:Match(lnum, s:ruby_indent_keywords)
if col > 0
call cursor(lnum, col)

if g:ruby_hanging_indent
let ind = virtcol('.') - 1 + &sw
else
let ind = indent('.') + &sw
endif
let ind = virtcol('.') - 1 + &sw
" TODO: make this better (we need to count them) (or, if a searchpair
" fails, we know that something is lacking an end and thus we indent a
" level
Expand Down

0 comments on commit 043f4ab

Please sign in to comment.