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

vi( and di( behave inconsistently #6

Open
kshenoy opened this issue May 16, 2013 · 5 comments
Open

vi( and di( behave inconsistently #6

kshenoy opened this issue May 16, 2013 · 5 comments

Comments

@kshenoy
Copy link

kshenoy commented May 16, 2013

vi( correctly seeks forward to the next parentheses pair and selects the text between them.
However, di( doesn't delete the text between them.

@paradigm
Copy link
Owner

Sorry it took me so long to get back to you >.<

Could you provide an example buffer contents / starting cursor position where this happens?

@kshenoy
Copy link
Author

kshenoy commented Sep 24, 2013

Holy shit, I just saw this now :(

Anyway, take any sort of text. This is the sample text I was using

Lorem ipsum dolor [s]it amet,( consetetur sadipscing elitr ), sed diam nonumy eirmod

where [ indicates the position of the cursor. As mentioned above, vi( correctly selects the text between the braces but di( doesn't delete it

@paradigm
Copy link
Owner

At this point I'm likely going to end up doing a full rewrite from the ground up when I get the chance which should take care of this and a number of other issues. May take me a bit to get to it, though :

@kshenoy
Copy link
Author

kshenoy commented Sep 24, 2013

Ok, no problem. Would it be too difficult to add support for custom next/prev mappings as shown [here]?(https://gist.github.com/kshenoy/4698889)

Basically, instead of automatically searching for the next parentheses and operating on them as we're doing now, you can specify whether to look ahead or behind.

@paradigm
Copy link
Owner

paradigm commented Oct 1, 2013

If I understood your request correctly, TextObjectify (is supposed to) already support that by setting the 'seek' value for the given mapping. That's one of the main things I use TextObjectify for, actually. See ":help textobjectify-configuration" and note the "seek" bullet point.

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

2 participants