Auto-close now detects closing tag on next line
This commit is contained in:
parent
5b8f2255cc
commit
4387105882
1 changed files with 4 additions and 2 deletions
6
vimrc
6
vimrc
|
@ -107,9 +107,10 @@ function! s:autoClose_HelperOpen(open, close)
|
|||
endfunc
|
||||
|
||||
function! s:autoClose_HelperClose(open, close)
|
||||
let next_c = getline(".")[col(".")-1]
|
||||
if next_c ==# a:close
|
||||
if getline(".")[col(".")-1] ==# a:close
|
||||
return "\<Right>"
|
||||
elseif match(getline("."+1), "\M^\s*".escape(a:close, "\\"))
|
||||
return "\<Down>\<Home>\<C-o>f".a:close."\<Right>"
|
||||
else
|
||||
return a:close
|
||||
end
|
||||
|
@ -502,6 +503,7 @@ function! s:init_ruby_file()
|
|||
|
||||
call s:autoClose_AddPair("{", "}")
|
||||
call s:autoClose_AddPair("(", ")")
|
||||
call s:autoClose_AddPair("[", "]")
|
||||
endfunction
|
||||
|
||||
function! s:RubyComment(a)
|
||||
|
|
Loading…
Reference in a new issue