473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

C++ code reformatter

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
Aug 16 '05 #1
9 4199
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

Aug 16 '05 #2
Stefan Klemm wrote:
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


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
Aug 16 '05 #3
Stefan Klemm wrote:
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


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 =----
Aug 16 '05 #4
> Linux: man ident

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

Aaron
Aug 16 '05 #5
Aaron Gray wrote:
I am after a free or open source C++ code reformatter.


Artistic Style

http://sourceforge.net/projects/astyle/
Aug 16 '05 #6
Stefan Klemm wrote:
Aaron Gray wrote:
I am after a free or open source C++ code reformatter.
Linux: man indent


man indent

INDENT(1L) INDENT(1L)

NAME
indent - changes the appearance of a C program
by inserting or deleting whitespace.
Aug 16 '05 #7
>> I am after a free or open source C++ code reformatter.

Artistic Style

http://sourceforge.net/projects/astyle/


Great, thanks alot,

Aaron
Aug 16 '05 #8

"John Ratliff" <us**@example.net> wrote in message
news:JUgMe.31567$084.11107@attbi_s22...
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.


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
Aug 20 '05 #9
Didn't know "free or open source" == "buy".

-vijai.

Aug 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Freund | last post by:
I've been looking for a good and free code beautifier that runs on linux. About the only ones I found where Trita (www.trita.com), which costs money and only runs on windows. The other one was...
51
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: jason | last post by:
Hello. Newbie on SQL and suffering through this. I have two tables created as such: drop table table1; go drop table table2; go
16
by: Dario de Judicibus | last post by:
I'm getting crazy. Look at this code: #include <string.h> #include <stdio.h> #include <iostream.h> using namespace std ; char ini_code = {0xFF, 0xFE} ; char line_sep = {0x20, 0x28} ;
19
by: Diego Andres Alvarez Marin | last post by:
Hi all! Is there a linux tool that uses as input my ugly C/C++ code and outputs a pretty and nice formated source code? Regards, Diego
2
by: -DG- | last post by:
No reply on my previous query, so I'll post this again. I've done a bit more research in the interim. I'm trying to find an easy way to port code from the older VS2003 format to the format used...
0
by: Brian L. Troutwine | last post by:
I've recently developed a need for a python source code re-formatter, ideally conforming to the sort of style that pylint enforces. I don't know of any, and my googling wasn't very productive. Does...
27
by: Tom Cole | last post by:
I'm starting to do more quantity of javascript coding and thought this might be a good time to investigate code styling. I primarily develop in Java and currently use the code styling techniques...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.