diff options
Diffstat (limited to 'docs/source/configuration/index.rst')
-rw-r--r-- | docs/source/configuration/index.rst | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/source/configuration/index.rst b/docs/source/configuration/index.rst index 94b5e347..33cd81ec 100644 --- a/docs/source/configuration/index.rst +++ b/docs/source/configuration/index.rst @@ -235,7 +235,8 @@ The following attribute keys will interpreted and may contain urwid attribute st as described in the :ref:`Themes` section above: `fg` (foreground), `bg` (background), `focus_fg` (foreground if focussed) and `focus_bg` (background if focussed). -An alternative string representation is read from the option `translated`. +An alternative string representation is read from the option `translated` or can be given +as pair of strings in `translation`. The following will make alot display the "todo" tag as "TODO" in white on red. :: @@ -263,3 +264,15 @@ like this:: [[encrypted]] translated= ⚷ + +You may use regular expressions in the tagstring subsections to theme multiple tagstrings at once. +If you do so, you can use the `translation` option to specify a string substitution that will +rename a matching tagstring. `translation` takes a comma separated *pair* of strings that will be fed to +:func:`re.sub`. For instance, to theme all your `nmbug`_ tagstrings you can use the following:: + + [[notmuch::.*]] + fg = '#fff' + bg = '#88d' + translation = 'notmuch::(\*)','nm\1' + +.. _nmbug: http://notmuchmail.org/nmbug/ |