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

Enable lookahead for argument text object #1031

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jphalip
Copy link
Contributor

@jphalip jphalip commented Nov 8, 2024

This allows motions like caa or dia to look ahead for potential arguments, say when the caret is positioned before the list of arguments. This would work similar to https://github.com/vim-scripts/argtextobj.vim and to standard motions like ci".

@lippfi
Copy link
Contributor

lippfi commented Nov 22, 2024

The lookahead doesn't always work

<caret>12 + 100 + myFun(arg1, arg2)

Copy link
Contributor

@lippfi lippfi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please have a look at the comments?

@jphalip
Copy link
Contributor Author

jphalip commented Nov 22, 2024

@lippfi Good catch with that failing example. I've made some fixes, which should address that.

@lippfi
Copy link
Contributor

lippfi commented Nov 26, 2024

This is what happens when I place caret inside "Hi there :(" and type via
image

P.S. you could use some useful methods from SearchGroup.kt to skip string ranges

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

Successfully merging this pull request may close these issues.

2 participants