Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't jump to nearest paired text object #78

Open
albert-ying opened this issue Aug 20, 2021 · 0 comments
Open

Doesn't jump to nearest paired text object #78

albert-ying opened this issue Aug 20, 2021 · 0 comments

Comments

@albert-ying
Copy link

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant