Messages in this thread | | | Date | Wed, 6 Jun 2018 14:25:28 -0600 | From | Jason Gunthorpe <> | Subject | Re: [PATCH] clang-format: Set IndentWrappedFunctionNames false |
| |
On Wed, Jun 06, 2018 at 01:18:59PM -0700, Joe Perches wrote: > On Wed, 2018-06-06 at 14:15 -0600, Jason Gunthorpe wrote: > > The true option causes this indenting for functions: > > > > static struct something_very_very_long * > > function(void *arg) > > { > > > > While a quick survey suggests that the usual Linux fallback is the GNU > > style: > > > > static struct something_very_very_long * > > function(void *arg) > > > [] > > AFAIK the above describes the more common choice in the code base? > > > > Not sure who's tree this is supposed to go through.. Andrew I guess? > > I believe so yes. > > I expect there will be more refinements to .clang-formata > as perhaps more people experiment with it too. > > Acked-by: Joe Perches <joe@perches.com>
Thanks Joe,
I saw your note in the original mailing-list thread and just wanted to say the way I use clang-format is editor based.
I have a hotkey that triggers clang-format to reformat the current statement, or current hi-lighted region. If I don't like it, then 'undo' puts it all back for manual adjustment..
This way I am selective of where I apply it, and I find it is something like 95% of the time good, IHMO.
Big time saver for wrapping long lines, moving code around (eg indent,de-indent) and other mundane daily tasks.
Cheers, Jason
| |