Integrated code formatter

Johan j at
Mon Jan 17 22:33:02 UTC 2022

On Monday, 17 January 2022 at 22:19:51 UTC, H. S. Teoh wrote:
> (Yes I know some code formatters have tags to suppress 
> automatic formatting, etc., but seriously, why do I need to 
> explicitly ask the computer not to do something I didn't want 
> it to do in the first place?)

The way I use clang-format (default with the sublime plugin by 
llvm) is that it only reformats your selection or current line, 
and sometimes one extra line of context around it.
clang-format is indeed something I very much miss for D. 
Precisely this "only reformat this small fragment" functionality 
is extremely time saving.
Also in code review, you can simply comment "clang-format" and 
all is clear. No more discussions about formatting :)


More information about the Digitalmars-d mailing list