This commit is contained in:
Alex Yatskov 2014-12-01 20:10:17 +09:00
parent ac53632892
commit 84c43333b5
2 changed files with 17 additions and 18 deletions

View File

@ -96,10 +96,17 @@ function! argwrap#extractContainer(range)
endfunction
function! argwrap#wrapContainer(range, container, arguments)
let l:line = a:range.lineStart
let l:argCount = len(a:arguments)
let l:line = a:range.lineStart
call setline(l:line, a:container.prefix)
for l:argument in a:arguments
call append(l:line, l:argument . ",")
for l:index in range(l:argCount)
let l:text = a:arguments[l:index]
if l:index < l:argCount - 1
let l:text .= ","
endif
call append(l:line, l:text)
let l:line += 1
exec printf("%s>", l:line)
endfor

View File

@ -1,16 +1,15 @@
a = Foo(a, [b, z], "hello, world", c, )
Foo(a, b)
a = Foo(a, [b, z], "hello, world", c)
Foo(
a,
[b, c],
d
b
)
Foo(a, [b, c], d)
Foo(
a
[b, "c"]
a,
[b, "c"],
d
)
@ -20,11 +19,4 @@ Foo(
d
)
Foo(
a,
[
b,
c
],
d
)
Foo(a, [b, c], d)