svermeulen / vim-subversive

Vim plugin providing operator motions to quickly replace text
MIT License
298 stars 4 forks source link

Using "inner" word object over multiple lines #3

Closed jrwrigh closed 5 years ago

jrwrigh commented 5 years ago

image

Take the screenshot above. I want to substitute the contents of the string on the right file with the contents of the string on the left file.

If the string were on the same line, I'd just do a yi" on the right file and then do si" on the left file. This can't be done over multiple lines though, so instead I have to do the more tedious 29yy and then s29<CR>.

This might not be the plugin to address this problem, but I figured at a minimum if a solution was found, it'd be nice to put on the README or something like that (plus I already typed it out here too 😅).

svermeulen commented 5 years ago

It sounds like you are just looking for a text-object for the current quotation across multiple lines. Is that right?

If so, then yeah that's outside the scope of this plugin :) As I say in the readme, this plugin works best when you have a bunch of custom text objects to work with, but does not provide any new text objects itself

jrwrigh commented 5 years ago

Yep, that's what I'm wanting to do pretty much. And that's also what I expected too.

Great plugin by the way! Surprised someone hasn't already done something similar before, because I run into this kind of stuff all the time.

svermeulen commented 5 years ago

Thanks, glad you find it useful