[PATCH 2 of 2] color: enable default color for tabs (BC)
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Aug 21 02:40:27 CDT 2014
On 08/20/2014 12:24 PM, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh at octave.org>
> # Date 1408562377 14400
> # Wed Aug 20 15:19:37 2014 -0400
> # Node ID 9d34433f73b54557667de9a8da77c7dde9e7c33c
> # Parent b58e6a9a966a2ae349db1af92943d2bc8898aa06
> color: enable default color for tabs (BC)
>
> This makes the color extension by default highlight tabs in changed
> lines of a diff. I picked magenta as the color of a tab.
while I love the idea of having the option to colorize tab, I do not
believe we can do it by default. There is real people out there that use
tab for indentation. I do not hink they will be happy to have their diff
turning pink all around the place.
We can either try to target mixed tab and space. Or just leave the
default to "not colorise" and suggest this in the example config.
>
> diff --git a/hgext/color.py b/hgext/color.py
> --- a/hgext/color.py
> +++ b/hgext/color.py
> @@ -11,7 +11,7 @@ This extension modifies the status and r
> to their output to reflect file status, the qseries command to add
> color to reflect patch status (applied, unapplied, missing), and to
> diff-related commands to highlight additions, removals, diff headers,
> -and trailing whitespace.
> +tabs, and trailing whitespace.
>
> Other effects in addition to color, like bold and underlined text, are
> also available. By default, the terminfo database is used to find the
> @@ -45,6 +45,7 @@ Default effects may be overridden from y
> diff.deleted = red
> diff.inserted = green
> diff.changed = white
> + diff.tab = bold magenta_background
> diff.trailingwhitespace = bold red_background
>
> resolve.unresolved = red bold
> @@ -255,6 +256,7 @@ except ImportError:
> 'diff.file_b': 'green bold',
> 'diff.hunk': 'magenta',
> 'diff.inserted': 'green',
> + 'diff.tab': 'bold magenta_background',
> 'diff.trailingwhitespace': 'bold red_background',
> 'diffstat.deleted': 'red',
> 'diffstat.inserted': 'green',
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list