From: Eric Sunshine Date: Sun, 17 Mar 2013 09:06:31 GMT Subject: Re: [PATCH 12/12] pretty: support %>> that steal trailing spaces Message-ID: In-Reply-To: <1363400683-14813-13-git-send-email-pclouds@gmail.com> On Fri, Mar 15, 2013 at 10:24 PM, Nguyễn Thái Ngọc Duy wrote: > This is pretty useful in `%<(100)%s%Cred%>(20)% an' where %s does not s/% an/%an/ > use up all 100 columns and %an needs more than 20 columns. By > replacing %>(20) with %>>(20), %an can steal spaces from %s. > > diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt > index 17f82f4..036c14a 100644 > --- a/Documentation/pretty-formats.txt > +++ b/Documentation/pretty-formats.txt > @@ -170,7 +170,10 @@ The placeholders are: > columns, padding spaces on the right if necessary > - '%>()', '%>|()': similar to '%<( respectively, but padding spaces on the left > -- '%><()', '%><|()': similar to '%<( +- '%>>()', '%>>|()': similar to '%>(|(/g > + respectively, except that if the next placeholder takes more spaces > + than given and there are spaces on its left, use those spaces > +- '%><()', '%><|()': similar to '% <(/g > respectively, but padding both sides (i.e. the text is centered)