www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - prettyprinter

reply "Paul D. Anderson" <paul.d.removethis.anderson comcast.andthis.net> writes:
Does anyone know of a prettyprint program for D code?

I use a text editor rather than an IDE and it would be nice if I 
could standardize the format of my code. It's not onerous to do 
it by hand but it can be tedious.

My text editor (Boxer) does pretty well on syntax highlighting 
(other than not recognizing 1_000_000 as a numeric literal and 
not understanding /+ +/ comment delimiters). But it doesn't 
reformat code to a particular style.

Thanks,

Paul
Dec 16 2011
next sibling parent Jesse Phillips <jessekphillips+D gmail.com> writes:
On Fri, 16 Dec 2011 23:59:58 +0100
"Paul D. Anderson" <paul.d.removethis.anderson comcast.andthis.net>
wrote:

 Does anyone know of a prettyprint program for D code?
 
 I use a text editor rather than an IDE and it would be nice if I 
 could standardize the format of my code. It's not onerous to do 
 it by hand but it can be tedious.
 
 My text editor (Boxer) does pretty well on syntax highlighting 
 (other than not recognizing 1_000_000 as a numeric literal and 
 not understanding /+ +/ comment delimiters). But it doesn't 
 reformat code to a particular style.
 
 Thanks,
 
 Paul

While this is likely a bad recommendation for Windows, indent is usable. I haven't figured out what configuration gets me what I want though. And depending on your attachment, my recommendation of Vim might not be help.
Dec 16 2011
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Uncrustify + UniversalIndentGUI. The latter comes packaged with
uncrustify, but it might not ship with the latest version which had
some D-related bugfixes.
Dec 16 2011