benma / visual-regexp.el

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

Show the arrow in a different face #14

Closed asmeurer closed 10 years ago

asmeurer commented 10 years ago

It would be useful to show the arrow in a different face (or maybe no face). It's often hard to tell if I have the whitespace correct at the edge of the replacement because I can't tell if it is part of the match or part of the arrow.

benma commented 10 years ago

I pushed a new version (cccbe92e7206865c5a8ef515cc6c791acfe76304). With this, you can customize the face and also the string of the arrow.

To solve your whitespace issue, you could either set the face (M-x customize-group "visual-regexp", modify "match separator face" and "match separator use custom face") or you could define vr/match-separator-string to be whitespace-less, for example "=>" instead of " => ", or something simpler even, such as "~".

Does this help?

asmeurer commented 10 years ago

Yes, this is exactly what I was looking for.