Integrated code formatter
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Jan 17 22:46:10 UTC 2022
On Mon, Jan 17, 2022 at 10:33:02PM +0000, Johan via Digitalmars-d wrote:
> 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.
Ah, well that would be nice indeed. ;-)
> clang-format is indeed something I very much miss for D. Precisely
> this "only reformat this small fragment" functionality is extremely
> time saving.
Does dfmt not do this?
> Also in code review, you can simply comment "clang-format" and all is
> clear. No more discussions about formatting :)
[...]
Point. I remember when I used to be more active on the Phobos PR queue,
a sad amount of time was spent over formatting issues (the right amount
ought to be zero. :-D).
T
--
Genius may have its limitations, but stupidity is not thus handicapped. -- Elbert Hubbard
More information about the Digitalmars-d
mailing list