C++ code reformatter

A

Aaron Gray

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
 
S

Stefan Klemm

Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:
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

Linux: man ident

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

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

Best Regards,
Stefan
 
J

John Ratliff

Stefan said:
Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:




Linux: man ident

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

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

Best Regards,
Stefan

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
 
K

Kevin Handy

Stefan said:
Am Tue, 16 Aug 2005 02:51:37 +0100 schrieb Aaron Gray:




Linux: man ident

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

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

Best Regards,
Stefan

man ident

ident - identify RCS keyword strings in files

I think you meant 'indent'
 
A

Aaron Gray

Linux: man ident

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

Aaron
 
E

E. Robert Tisdale

Stefan said:
Linux: man indent

> man indent
INDENT(1L) INDENT(1L)

NAME
indent - changes the appearance of a C program
by inserting or deleting whitespace.
.
.
.
While an attempt was made to get indent working for C++,
it will not do a good job on any C++ source
except the very simplest.
.
.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top