1
0
mirror of https://github.com/amix/vimrc synced 2025-06-17 10:55:00 +08:00

Updated plugins

This commit is contained in:
Amir
2020-12-04 22:15:32 +01:00
parent e83f5ea2e7
commit a06964dd3b
261 changed files with 6955 additions and 2773 deletions

View File

@ -26,7 +26,12 @@ endif
if !exists('g:ruby_indent_block_style')
" Possible values: "expression", "do"
let g:ruby_indent_block_style = 'expression'
let g:ruby_indent_block_style = 'do'
endif
if !exists('g:ruby_indent_hanging_elements')
" Non-zero means hanging indents are enabled, zero means disabled
let g:ruby_indent_hanging_elements = 1
endif
setlocal nosmartindent
@ -321,7 +326,11 @@ function! s:ClosingBracketOnEmptyLine(cline_info) abort
if searchpair(escape(bracket_pair[0], '\['), '', bracket_pair[1], 'bW', s:skip_expr) > 0
if closing_bracket == ')' && col('.') != col('$') - 1
let ind = virtcol('.') - 1
if g:ruby_indent_hanging_elements
let ind = virtcol('.') - 1
else
let ind = indent(line('.'))
end
elseif g:ruby_indent_block_style == 'do'
let ind = indent(line('.'))
else " g:ruby_indent_block_style == 'expression'
@ -546,7 +555,9 @@ function! s:AfterUnbalancedBracket(pline_info) abort
let [opening, closing] = s:ExtraBrackets(info.plnum)
if opening.pos != -1
if opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if !g:ruby_indent_hanging_elements
return indent(info.plnum) + info.sw
elseif opening.type == '(' && searchpair('(', '', ')', 'bW', s:skip_expr) > 0
if col('.') + 1 == col('$')
return indent(info.plnum) + info.sw
else