Vim will automatically move the cusor to the next text object when target object is not under cursor.
For example, if you run di" on following example, when cursor is located at first charactor.
It will autojump to the target and give:
This works for the regular textobj defined as
call textobj#user#plugin('quote', {
\ 'a': {
\ 'pattern': '".*"',
\ 'select': ['aB', 'iB'],
\ },
\ })
However, for paired text object, it doesn't work (i.e. cursor does not jump automatically to the next text object when target object is not under cursor)
call textobj#user#plugin('quotep', {
\ 'b': {
\ 'pattern': ['"', '"'],
\ 'select-a': 'aA',
\ 'select-i': 'iA',
\ },
\ })
Vim will automatically move the cusor to the next text object when target object is not under cursor.
For example, if you run
di"on following example, when cursor is located at first charactor.It will autojump to the target and give:
This works for the regular
textobjdefined asHowever, for paired text object, it doesn't work (i.e. cursor does not jump automatically to the next text object when target object is not under cursor)