TextObjectify icon indicating copy to clipboard operation
TextObjectify copied to clipboard

vi( and di( behave inconsistently

Open kshenoy opened this issue 12 years ago • 5 comments

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

kshenoy avatar May 16 '13 16:05 kshenoy

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

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

paradigm avatar Jun 20 '13 03:06 paradigm

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

kshenoy avatar Sep 24 '13 17:09 kshenoy

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 :

paradigm avatar Sep 24 '13 19:09 paradigm

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.

kshenoy avatar Sep 24 '13 21:09 kshenoy

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.

paradigm avatar Oct 01 '13 15:10 paradigm