Re: [PATCH v3 11/13] pretty: support padding placeholders, %< %> and %>

2013-04-17 Thread Duy Nguyen
On Wed, Apr 17, 2013 at 6:41 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> +delete_trailing_dollar() { >> + sed 's/\$$//' >> +} > > This is what we have qz_to_tab_space for, isn't it? Thanks! I looked for something like this, but my eyes focused on similar sed line and forgo

Re: [PATCH v3 11/13] pretty: support padding placeholders, %< %> and %>

2013-04-16 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> +delete_trailing_dollar() { >> +sed 's/\$$//' >> +} > > This is what we have qz_to_tab_space for, isn't it? With it, you > can not just avoid "trailing whitespace", but also "indent with > spaces", like this: > > Q message

Re: [PATCH v3 11/13] pretty: support padding placeholders, %< %> and %>

2013-04-16 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +delete_trailing_dollar() { > + sed 's/\$$//' > +} This is what we have qz_to_tab_space for, isn't it? With it, you can not just avoid "trailing whitespace", but also "indent with spaces", like this: Q message thousandZ -- To unsubscribe from th

[PATCH v3 11/13] pretty: support padding placeholders, %< %> and %>

2013-04-16 Thread Nguyễn Thái Ngọc Duy
Either %<, %> or %>< standing before a placeholder specifies how many columns (at least as the placeholder can exceed it) it takes. Each differs on how spaces are padded: %< pads on the right (aka left alignment) %> pads on the left (aka right alignment) %>< pads both ways equally (aka cente