From c0dd94a8e229156445582d121ad61b32a241d47a Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 2 Aug 2016 00:39:33 +0100 Subject: [PATCH] docs: index-color --- doc/manual.xml.head | 262 ++++++++++++++++++++++++++++++++++++++++- doc/muttrc.index-color | 37 ++++++ doc/vimrc.index-color | 13 ++ 3 files changed, 307 insertions(+), 5 deletions(-) create mode 100644 doc/muttrc.index-color create mode 100644 doc/vimrc.index-color diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 937c853f1..640cc82e7 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -2651,7 +2651,7 @@ silently truncated at the screen width, and are not wrapped. color - + foreground @@ -2666,7 +2666,7 @@ silently truncated at the screen width, and are not wrapped. uncolor - + @@ -2696,8 +2696,8 @@ specify one or the other). header and body match regexp in the header/body of a message, -index matches pattern (see -) in the message index. Note that IMAP +index-object can match pattern +(see ) in the message index. Note that IMAP server-side searches (=b, =B, =h) are not supported for color index patterns. @@ -2711,6 +2711,14 @@ patterns. bold (highlighting bold patterns in the body of messages) error (error messages printed by Mutt) hdrdefault (default color of the message header in the pager) +index_author (color of the author name in the index, uses pattern) +index_collapsed (the number of messages in a collapsed thread in the index) +index_date (color of the date field in the index) +index_flags (color of the message flags in the index) +index_label (color of the message label in the index) +index_number (color of the message number in the index) +index_size (color of the message size and line number in the index) +index_subject (color of the subject in the index, uses pattern) indicator (arrow or bar used to indicate the current item in a menu) markers (the + markers at the beginning of wrapped lines in the pager) message (informational messages) @@ -2725,6 +2733,24 @@ patterns. underline (highlighting underlined patterns in the body of messages) + +index-object can be one of the following: + + + +index (default highlighting of the entire index line, uses pattern) +index_date (the date field) +index_flags (the message flags, %S %Z, uses pattern) +index_number (the message number, %C) +index_collapsed (the number of messages in a collapsed thread, %M) +index_author (the author name, %A %a %F %L %n, uses pattern) +index_subject (the subject, %s, uses pattern) +index_size (the message size, %c %l) +index_label (the message label, %y %Y) +index_tags (the transformed message tags, %g) +index_tag (an individual message tag, %G, uses pattern / tag name) + + foreground and background can be one of the following: @@ -2842,7 +2868,7 @@ command. Usage: unmono - + @@ -9228,6 +9254,232 @@ ifndef USE_SIDEBAR finish + + Index Color Patch + Custom rules for theming the email index + + + Patch + + + To check if Mutt supports Index Color, look for + patch-index-color in the mutt version. + See: . + + + + Dependencies: + mutt-1.6.2 + status-color patch + + + This patch is part of the NeoMutt Project. + + + + Introduction + + + The index-color patch allows you to specify colors for + individual parts of the email index. e.g. Subject, Author, Flags. + + + + First choose which part of the index you'd like to color. + Then, if needed, pick a pattern to match. + + + + Note: The pattern does not have to refer to the object you wish to + color. e.g. + + + +color index_author red default "~smutt" + + + + The author appears red when the subject (~s) contains mutt. + + + + + + + Colors + + + All the colors default to default, i.e. unset. + + + + The index objects can be themed using the color command. + Some objects require a pattern. + + + +color index-object foreground background +color index-object foreground background pattern + + + + Index Colors + + + + Object + Pattern + Highlights + + + + + index + yes + Entire index line + + + index_author + yes + Author name, %A %a %F %L %n + + + index_collapsed + no + Number of messages in a collapsed thread, %M + + + index_date + no + Date field + + + index_flags + yes + Message flags, %S %Z + + + index_label + no + Message label, %y %Y + + + index_number + no + Message number, %C + + + index_size + no + Message size, %c %l + + + index_subject + yes + Subject, %s + + + +
+
+ + + + + Muttrc + +# Example Mutt config file for the 'index-color' feature. + +# Entire index line +color index white black '.*' + +# Author name, %A %a %F %L %n + +# Give the author column a dark grey background +color index_author default color234 '.*' + +# Highlight a particular from (~f) +color index_author brightyellow color234 '~fRay Charles' + +# Message flags, %S %Z +# Highlight the flags for flagged (~F) emails +color index_flags default red '~F' + +# Subject, %s +# Look for a particular subject (~s) +color index_subject brightcyan default '~s\(closes #[0-9]+\)' + +# Number of messages in a collapsed thread, %M +color index_collapsed default brightblue + +# Date field +color index_date green default + +# Message label, %y %Y +color index_label default brightgreen + +# Message number, %C +color index_number red default + +# Message size, %c %l +color index_size cyan default + +# vim: syntax=muttrc + + + + + See Also + + + NeoMutt Project + Regular Expressions + Patterns + $index_format + Color command + Status-Color patch + Keywords patch + + + + + Known Bugs + None + + + + Credits + + Christian Aichinger Greek0@gmx.net + Christoph Myon Berg myon@debian.org + Elimar Riesebieter riesebie@lxtec.de + Eric Davis edavis@insanum.com + Vladimir Marek Vladimir.Marek@oracle.com + Richard Russon rich@flatcap.org + + +
+ Sidebar Overview of mailboxes diff --git a/doc/muttrc.index-color b/doc/muttrc.index-color new file mode 100644 index 000000000..3ec91f527 --- /dev/null +++ b/doc/muttrc.index-color @@ -0,0 +1,37 @@ +# Example Mutt config file for the 'index-color' feature. + +# Entire index line +color index white black '.*' + +# Author name, %A %a %F %L %n + +# Give the author column a dark grey background +color index_author default color234 '.*' + +# Highlight a particular from (~f) +color index_author brightyellow color234 '~fRay Charles' + +# Message flags, %S %Z +# Highlight the flags for flagged (~F) emails +color index_flags default red '~F' + +# Subject, %s +# Look for a particular subject (~s) +color index_subject brightcyan default '~s\(closes #[0-9]+\)' + +# Number of messages in a collapsed thread, %M +color index_collapsed default brightblue + +# Date field +color index_date green default + +# Message label, %y %Y +color index_label default brightgreen + +# Message number, %C +color index_number red default + +# Message size, %c %l +color index_size cyan default + +# vim: syntax=muttrc diff --git a/doc/vimrc.index-color b/doc/vimrc.index-color new file mode 100644 index 000000000..8de9c67ef --- /dev/null +++ b/doc/vimrc.index-color @@ -0,0 +1,13 @@ +" Vim syntax file for the mutt index-color patch + +syntax keyword muttrcColorField contained index +syntax keyword muttrcColorField contained index_author +syntax keyword muttrcColorField contained index_collapsed +syntax keyword muttrcColorField contained index_date +syntax keyword muttrcColorField contained index_flags +syntax keyword muttrcColorField contained index_label +syntax keyword muttrcColorField contained index_number +syntax keyword muttrcColorField contained index_size +syntax keyword muttrcColorField contained index_subject + +" vim: syntax=vim -- 2.40.0