bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50845: [External] : bug#50845: Color capturing groups in query repla


From: Drew Adams
Subject: bug#50845: [External] : bug#50845: Color capturing groups in query replace regexp
Date: Mon, 27 Sep 2021 16:08:54 +0000

> When doing some complex capturing and replacing it could be helpful to
> see what each of the groups captured.
> 
> So instead of coloring the match with a single color when query
> replacing, the part captured by the first parens
> has one color, the second capturing group a different color, etc. and
> after replacing if the user used a
> comma to replace but not move point to the next match, the same colors
> indicate the replacement texts for the
> corresponding groups.
> 
> And the matching parts outside of parens can have the same face which
> qrr currently uses.

FWIW, together, my libraries `isearch+.el' and
`replace+.el' do that.  (The former does it
also for Isearch.)

Each regexp group match is highlighted in the
currently search hit, and in other hits than the
current one the odd and even group matches are
highlighted (odd and even faces).

IMO, this feature is really helpful.  Regexp
matches should be shown this way, in general.
(Of course, it's optional for users.)

https://www.emacswiki.org/emacs/download/isearch%2b.el

https://www.emacswiki.org/emacs/download/replace%2b.el



reply via email to

[Prev in Thread] Current Thread [Next in Thread]