[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C++: Indenting and formatting program sources.



On 18-Nov-2001 Shaul Karl wrote:
> Can anyone recommend a program to indent and format C++ program sources 
> for consistency of style and perhaps better readability?
> Specifying the used options or attaching a suitable configuration file 
> (like a .ident.pro for GNU indent) is desirable.
> 
> GNU indent does not targeted directly to C++ code. Is this a problem?
> The only official deb that I found for this task is astyle. I have not 
> tried it yet. Are there others? Are there commonly used programs for 
> this task that are not debianized?
> The LDP C-C++ Beautifier HOW-TO mentions bcpp. Is it commonly used?
> 
> Is there a way to have vim force a standard and consistent style? Once 
> again, attaching a configuration file or pointing out to a standard one 
> is desirable.

indent is the most common, followed by astyle (Artistic Style).  Both wil do
what you want.

vim can be almost made to do it.



Reply to: