vim-textobj-user
vim-textobj-user copied to clipboard
Doesn't jump to nearest paired text object
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.
Here is the "target"
^
It will autojump to the target and give:
Here is the ""
^
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',
\ },
\ })