Re: [PATCH v3 4/6] --color-words: Make non-word characters configurable
- From
Ping Yin <pkufranky@gmail.com>
- Date
- May 4, 2008, 07:04 UTC
- Message-ID
- <46dff0320805040004g2f38494fx33e062ede4204bd4@mail.gmail.com>
- In-Reply-To
- <7vk5iar2it.fsf@gitster.siamese.dyndns.org>
On Sun, May 4, 2008 at 2:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Ping Yin <pkufranky@gmail.com> writes: > > > A more sensible implementation is to use 'insert' instead of 'replace'. > > Say, to insert a line break between runs of word characters and non-word > > characters or between non-word characters. > > > > That is, "foo>=bar" will be rewritten as "foo\n>\n=\nbar" instead of > > "foo\n\nbar". > > Hmmmm. > > I am not sure if/why you would want a separator between '>' and '=' in > that example. Shouldn't that be "foo <sep> >= <sep> bar"?
That's intentional. If i change >= to >, i want it to be highlighted as <r>=</r> instead of <r> >= </r> <g> > </g> (spaced added for readability). So i tend to consider each non-word character as a single word.
-- Ping Yin