[Cs-dev] script for formatting C or C++ code
Date | 2009-05-09 19:41 |
From | victor |
Subject | [Cs-dev] script for formatting C or C++ code |
Attachments | None None |
Does anyone have a script handy that I can use to
run through
100+ C++ to format/ident lines? I remember Istvan
use to have
something like this because all my code was
miraculuously idented
the next day I committed. I wonder if anyone else
might have
something like that.
Victor |
Date | 2009-05-09 19:43 |
From | victor |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
Attachments | None None |
I mean a 100+ C++ files
|
Date | 2009-05-09 19:45 |
From | Justin Smith |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
On Sat, May 9, 2009 at 11:41 AM, victor |
Date | 2009-05-09 19:55 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
I use emacs and indent-buffer Also untabify-buffer and picture-mode ^c^c Then with a macro one just lets it happen There is Istvan's formatter somewhere -- will look ==John ff > On Sat, May 9, 2009 at 11:41 AM, victor |
Date | 2009-05-09 20:46 |
From | victor |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
I do this on individual files, but my emacs lisp is non-existent, so I would not know how to do it for a batch of files Victor ----- Original Message ----- From: |
Date | 2009-05-09 20:54 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
emacs *.cpp Then a macro that does th ereformat and then saves and kills the buffer ^U 100 ^C-e > I do this on individual files, but my emacs lisp is non-existent, > so I would not know how to do it for a batch of files > > Victor > ----- Original Message ----- > From: |
Date | 2009-05-10 15:27 |
From | Michael Gogins |
Subject | Re: [Cs-dev] script for formatting C or C++ code |
astyle is a program that does what you want. A number of programmer's editors use it. I use it. Regards, Mike On 5/9/09, jpff@cs.bath.ac.uk |