Improved trimming around = and : characters

This commit is contained in:
Alex Yatskov 2015-02-20 13:03:38 +09:00
parent a25bb6ad76
commit 93284608cc

View File

@ -102,7 +102,8 @@ endfunction
function! argwrap#trimArgument(text) function! argwrap#trimArgument(text)
let l:trim = substitute(a:text, '^\s*\(.\{-}\)\s*$', '\1', '') let l:trim = substitute(a:text, '^\s*\(.\{-}\)\s*$', '\1', '')
return substitute(l:trim, '\([:=]\)\s\{2,}', '\1 ', '') let l:trim = substitute(l:trim, '\([:=]\)\s\{2,}', '\1 ', '')
return substitute(l:trim, '\s\{2,}\([:=]\)', ' \1', '')
endfunction endfunction
function! argwrap#extractContainerArgs(text) function! argwrap#extractContainerArgs(text)