benma / visual-regexp.el

A regexp/replace command for Emacs with interactive visual feedback
392 stars 28 forks source link

Preserve region after vr/replace #62

Open CyberShadow opened 3 years ago

CyberShadow commented 3 years ago

Hi, sorry if this has been asked before.

Would it be possible to have an option so that when vr/replace completes, the region is restored? That would make it easier to perform a few successive replaces in the same region.

Thanks!

benma commented 2 years ago

What is the behaviour of the built-in Emacs replace function?

CyberShadow commented 2 years ago

It does not restore the region.

A way to make it do that is discussed here, though I couldn't quite get it to work: https://lists.gnu.org/archive/html/help-gnu-emacs/2011-01/msg00453.html