Skip to content

Doesn't jump to nearest paired text object #78

@albert-ying

Description

@albert-ying

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',
\   },
\ })


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions