From: Rocco Rutte Date: Sat, 4 Apr 2009 11:46:04 +0000 (+0200) Subject: Manual: Add section on padding for format strings X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b83471d5e3b346adffbb95ce4a04943adc9a57a;p=neomutt Manual: Add section on padding for format strings --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 55649eccc..c160507e2 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -4326,6 +4326,70 @@ terminal's title, if supported. + +Padding + + +In most format strings, Mutt supports different types of padding using +special %-expandos: + + + + +%|X + + +When this occurs, Mutt will fill the rest of the +line with the character X. For +example, filling the rest of the line with dashes is +done by setting: + + +set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-" + + + + +%>X + + + +Since the previous expando stops at the end of line, there must be a way +to fill the gap between two items via the %>X +expando: it puts as many characters X in between two +items so that the rest of the line will be right-justified. For example, +to not put the version string and hostname the above example on the left +but on the right and fill the gap with spaces, one might use (note the +space after %>): + + +set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)" + + + +%*X + + + +Normal right-justification will print everything to the left of the +%>, displaying padding and whatever lies to the +right only if there's room. By contrast, soft-fill gives +priority to the right-hand side, guaranteeing space to display it and +showing padding only if there's still room. If necessary, soft-fill will +eat text leftwards to make room for rightward text. For example, to +right-justify the subject making sure as much as possible of it fits on +screen, one might use (note two spaces after %* +: the second ensures there's a space between the truncated +right-hand side and the subject): + + +set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s" + + + + + +