This commit is contained in:
Alex Yatskov 2014-12-02 06:23:06 +09:00
parent 4aadd46bbf
commit 9986daee0a
2 changed files with 11 additions and 9 deletions

View File

@ -104,9 +104,7 @@ function! argwrap#updateScope(stack, char)
endfunction endfunction
function! argwrap#trimArgument(text) function! argwrap#trimArgument(text)
let l:stripped = substitute(a:text, "\\s\\+", "", "") return substitute(a:text, '^\s*\(.\{-}\)\s*$', '\1', '')
let l:stripped = substitute(l:stripped, "^\\s\\+", "", "")
return l:stripped
endfunction endfunction
function! argwrap#extractArguments(text) function! argwrap#extractArguments(text)

View File

@ -1,12 +1,16 @@
a = Foo("a": 4, "z": 2, [b, z], "hello, world", c) a = Foo(
"a": 4,
"z": 2,
[b, z],
"hello, world",
c
)
Foo(a b, c d)
Foo(a, b) Foo(a, b)
Foo( Foo(a, [b, [2, 3] c], d)
a,
[b, c],
d
)
Foo( Foo(
a, a,