Answers:
其他答案涵盖了为什么会发生这种情况。这是解决它的好方法。
wellle / targets.vim。我最近才发现这个插件,我认为它被大大低估了。它提供了一个新的文本对象:din(助记符:(d)elete(ⅰ)n侧(n)的转“(”这是与其他运营商和几种不同的对象,如兼容an(,in",il((最后括号内)
它还会覆盖默认行为,i(以便首先查看光标是否在括号中,然后查看(如果不是)它的工作方式与相同in(。可以打开或关闭此行为。例如:
def foo(bar):
^cursor here
键入的ci(作用与相同cin(,因为光标不在括号内。
def foo( ):
        ^Cursor here, and in insert mode
这也接受一个计数:
def foo(bar):           #Define function foo(bar)
^cursor here
打字c2in(:
def foo(bar):           #Define function foo( )
                                             ^cursor here
这也提供了一个新的对象“参数”。例如,dana意思是“删除下一个参数”。这也接受计数。例如:
def foo(arg1, arg2, BADarg3):
^ cursor here
打字d3ana:
def foo(arg1, arg2):
                  ^ cursor here
该插件还有许多其他功能,但这是基本功能。