jed-users mailing list

[2002 Date Index] [2002 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Reindent an entire C code in one shot


Both good suggestions as far as they go.  However I also find myself
working with Java, Python, SQL (or PL/SQL), XML, shell script, ... often
mixed together (e.g. - SQL embedded in Shell, Python or Java), all with
more or less appropriate modes, but none of which let me consistently
and correctly reindent a range of lines without going through them one
by one.

Embedded SQL makes a particularly good example, since I'd love to be
able to switch to PLSQL mode, mark the embedded SQL code, and reformat
it from grotesque to graceful.  This really shouldn't be that hard to
accomplish if you can already get one line to do the right thing, but
I've run down several blind alleys trying.

Reindenting the whole file can also be counter to good revision control
(SCCS/RCS/CVS/Perforce/...) hygene because it can mask real functional
changes.

On Mon, 18 Nov 2002 19:29:40 -0500 John E. Davis wrote:
> Tom Culliton <culliton@xxxxxx> wrote:
> >It'd be especially useful when cleaning up code written by amateurs and
> >novices who don't know better, and don't have enough "keyboard hours" to
> >even understand why clean consistent formatting is important when you
> >try to explain it to them. 8-/
> 
> For C code, I prefer to use the c_indent_buffer function in krconv.sl.
> Another possibility is to use the unix indent utility.
> 
> --John
> 
> --------------------------
> To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
> the word "unsubscribe" in the message body.
> Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2002 date index] [2002 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]