diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-07 14:40:56 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-05-07 14:40:56 -0500 |
commit | 831360318a7ab8fb419206a6043025fbebdbf790 (patch) | |
tree | e6b227b6d2cf375636019523a89e3ec737394169 | |
parent | 0512f898c5ce10f2eef75e405440d721d4ed6807 (diff) | |
download | vim-textobj-831360318a7ab8fb419206a6043025fbebdbf790.tar.gz vim-textobj-831360318a7ab8fb419206a6043025fbebdbf790.zip |
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
-rw-r--r-- | vim/plugin/textobj.vim | 8 |
1 files 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! \<BS>" |