Connecting Tech Pros Worldwide Forums | Help | Site Map

C++ code reformatter

Aaron Gray
Guest
 
Posts: n/a
#1: Aug 16 '05
Hi,

I am after a free or open source C++ code reformatter. Basically to change
tabs from 3 to 2 and use spaces instead of tabs. And hopefully to neaten up
code.

Aaron


Stefan Klemm
Guest
 
Posts: n/a
#2: Aug 16 '05

re: C++ code reformatter


Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:
[color=blue]
> Hi,
>
> I am after a free or open source C++ code reformatter. Basically to change
> tabs from 3 to 2 and use spaces instead of tabs. And hopefully to neaten up
> code.
>
> Aaron[/color]

Linux: man ident

or (platform independent, if you have installed vim/gvim):

vim source.cpp
set ts=2
%retab
set et

Best Regards,
Stefan

John Ratliff
Guest
 
Posts: n/a
#3: Aug 16 '05

re: C++ code reformatter


Stefan Klemm wrote:[color=blue]
> Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:
>
>[color=green]
>>Hi,
>>
>>I am after a free or open source C++ code reformatter. Basically to change
>>tabs from 3 to 2 and use spaces instead of tabs. And hopefully to neaten up
>>code.
>>
>>Aaron[/color]
>
>
> Linux: man ident
>
> or (platform independent, if you have installed vim/gvim):
>
> vim source.cpp
> set ts=2
> %retab
> set et
>
> Best Regards,
> Stefan
>[/color]

I've always wanted something like Jalopy (http://jalopy.sf.net/) for
Java, but for C++ (and every other language I use). I wonder if there is
anything better than an indenter.

--John Ratliff
Kevin Handy
Guest
 
Posts: n/a
#4: Aug 16 '05

re: C++ code reformatter


Stefan Klemm wrote:[color=blue]
> Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:
>
>[color=green]
>>Hi,
>>
>>I am after a free or open source C++ code reformatter. Basically to change
>>tabs from 3 to 2 and use spaces instead of tabs. And hopefully to neaten up
>>code.
>>
>>Aaron[/color]
>
>
> Linux: man ident
>
> or (platform independent, if you have installed vim/gvim):
>
> vim source.cpp
> set ts=2
> %retab
> set et
>
> Best Regards,
> Stefan
>[/color]

man ident

ident - identify RCS keyword strings in files

I think you meant 'indent'

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Aaron Gray
Guest
 
Posts: n/a
#5: Aug 16 '05

re: C++ code reformatter


> Linux: man ident

What package is 'indent' in so I can download it for Cygwin.

Aaron


E. Robert Tisdale
Guest
 
Posts: n/a
#6: Aug 16 '05

re: C++ code reformatter


Aaron Gray wrote:
[color=blue]
> I am after a free or open source C++ code reformatter.[/color]

Artistic Style

http://sourceforge.net/projects/astyle/
E. Robert Tisdale
Guest
 
Posts: n/a
#7: Aug 16 '05

re: C++ code reformatter


Stefan Klemm wrote:
[color=blue]
> Aaron Gray wrote:
>[color=green]
>>I am after a free or open source C++ code reformatter.[/color]
>
> Linux: man indent[/color]

[color=blue]
> man indent[/color]
INDENT(1L) INDENT(1L)

NAME
indent - changes the appearance of a C program
by inserting or deleting whitespace.
Aaron Gray
Guest
 
Posts: n/a
#8: Aug 16 '05

re: C++ code reformatter


>> I am after a free or open source C++ code reformatter.[color=blue]
>
> Artistic Style
>
> http://sourceforge.net/projects/astyle/[/color]

Great, thanks alot,

Aaron


Ira Baxter
Guest
 
Posts: n/a
#9: Aug 20 '05

re: C++ code reformatter



"John Ratliff" <user@example.net> wrote in message
news:JUgMe.31567$084.11107@attbi_s22...
[color=blue]
> I've always wanted something like Jalopy (http://jalopy.sf.net/) for
> Java, but for C++ (and every other language I use). I wonder if there is
> anything better than an indenter.[/color]

See http://www.semanticdesigns.com/Products/Formatters
These formatters reformat the text, not just re-indent it.
C, C++, C#, Java, lots more.


--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com


Vijai Kalyan
Guest
 
Posts: n/a
#10: Aug 21 '05

re: C++ code reformatter


Didn't know "free or open source" == "buy".

-vijai.

Closed Thread