tommcdo / vim-exchange

Easy text exchange operator for Vim
MIT License
756 stars 23 forks source link

TextObjectify interferes with repeating cxi/a commands #21

Closed jakubgs closed 10 years ago

jakubgs commented 10 years ago

Hi,

Great plugin, I just found it thanks to Drew's vimcast(http://vimcasts.org/episodes/swapping-two-regions-of-text-with-exchange-vim/).

I have also the TextObjectify(https://github.com/paradigm/TextObjectify) plugin installed which makes some word objects more logical too work with as well as allows you to define some yourself.

The sad thing is when i try to repeat something like cxi" with . command it doesn't happen. I just see this in the status line and nothing happens: exchange

Any possibility of fixing that?

wellle commented 10 years ago

I believe that's a flaw of TextObjectify, not vim-exchange. Try targets.vim for example instead of TextObjectify.

Here is an example of repeated exchanging. Consider

a, b, c, d, e, f

With the cursor on a typing cxin,... leads to

a, c, b, e, d, f

Explanation: cxin, selects the text between the next commas for exchanging (while moving the cursor into that region), . repeats that command (exchanging the first two regions between commas) and the second pair of dots does it again on the next two comma separated regions.

jakubgs commented 10 years ago

Makes sense. I'll check out targets plugin but I'll also report this to the authors of TextObjectify. Thanks!

wellle commented 10 years ago

There is already an issue about broken repeatability.

jakubgs commented 10 years ago

Looks like it. Still, targets.vim works flawlessly, even better than TextObjectify. I think this issue can be taken behind the house and shot.

tommcdo commented 10 years ago

Follow me, Issue. I just want to talk...