benma / visual-regexp.el

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

Add enhanced query-replace history like in emacs 25.0 [Feature request] #24

Closed kaushalmodi closed 8 years ago

kaushalmodi commented 9 years ago

Hi,

Can you please add the enhanced query-replace history like the one added in emacs 25.0 for the M-x query-replace?

From the NEWS file:

\ Search and Replace

*\ Query-replace history is enhanced. When query-replace reads the FROM string from the minibuffer, typing M-p will now show previous replacements as "FROM SEP TO", where FROM and TO are the original text and its replacement, and SEP is an arrow string defined by the new variable query-replace-from-to-separator. To select a prior replacement, type M-p until the desired replacement appears in the minibuffer, and then exit the minibuffer by typing RET.

Brief description of this feature

benma commented 8 years ago

Sorry for the slight delay :sweat_smile:

I pushed some code to make this happen in 80668e93223ad54d0c4c8facc1bac1cdf2155f4c. Please give feedback and report any bugs you might find.

kaushalmodi commented 8 years ago

No worries, thanks for implementing this! :)

It worked wonderfully on the few test query replaces I made.