svermeulen / vim-subversive

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

[Feature Request] Substitution preview #6

Closed 0xC0FFEE closed 5 years ago

0xC0FFEE commented 5 years ago

Neovim has a feature called inccommand, which previews of (among others) the result of the :substitute command.

Would it be possible to support the same for the :SubversiveSubstitute* commands?

svermeulen commented 5 years ago

That's pretty neat, I didn't know about that command. I can think of a way to do this, yes

svermeulen commented 5 years ago

Ok should work now. Should use the actual substitute command instead of just a prompt for replacement text when inccommand is set, so that the preview occurs

0xC0FFEE commented 5 years ago

Awesome! I'll give it a spin tomorrow, but this looks really promising already :+1:

0xC0FFEE commented 5 years ago

Works like a charm! Thank you for implementing this so quickly.

This really makes the plugin usable for me, as I'm so used to the substitution preview by now. It's highly addictive ;-).

svermeulen commented 5 years ago

Ok great good to know

No problem - Thanks for pointing out that neovim feature, I somehow missed that. I can see why it's addictive