aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 14:54:32 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 14:54:32 -0500
commit0f98b97627d921394d17b4abdfa628f602599e5b (patch)
tree36d45a0f109c62ba981506297380fdd60ab09d1f
parentc4ee4359c420c853bc682242cc57f11f8f7cafe4 (diff)
downloadvim-textobj-0f98b97627d921394d17b4abdfa628f602599e5b.tar.gz
vim-textobj-0f98b97627d921394d17b4abdfa628f602599e5b.zip
handle the first argument a bit better when the second argument is on the next line
-rw-r--r--vimrc12
1 files changed, 12 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index d33e693..f28fef7 100644
--- a/vimrc
+++ b/vimrc
@@ -461,6 +461,18 @@ function Textobj_arg(inner, count)
endwhile
elseif endline[argend] != ')'
let argend += matchend(strpart(endline, argend + 1), '^\s*') + 1
+ if startline[argbegin - 2] == '('
+ for line in [strpart(endline, argend)] +
+ \ getline(argendline + 1, line('$'))
+ let argincr = matchend(line, '\s*\ze\S')
+ if argincr != -1
+ let argend += argincr
+ break
+ endif
+ let argendline += 1
+ let argend = 0
+ endfor
+ endif
endif
if argend == strlen(endline)
let argend = 0