From 831360318a7ab8fb419206a6043025fbebdbf790 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Wed, 7 May 2008 14:40:56 -0500 Subject: don't readjust the cursor if the command is 'c', just use 'd' as the command to start with, and start insert mode after that --- vim/plugin/textobj.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vim/plugin/textobj.vim b/vim/plugin/textobj.vim index 85381df..e8fd804 100644 --- a/vim/plugin/textobj.vim +++ b/vim/plugin/textobj.vim @@ -29,10 +29,14 @@ function Textobj(char, callback) let objlength -= 1 endif call cursor(startline, startcol) - exe 'normal! '.a:operator.objlength.' ' + if a:operator == 'c' + let operator = 'd' + else + let operator = a:operator + end + exe 'normal! '.operator.objlength.' ' if a:operator == 'c' - normal! l startinsert elseif a:operator == 'v' exe "normal! \" -- cgit v1.2.3-54-g00ecf