Beautifying in a different way?

Kirtikumar Satam, ECE, UMASS Amherst satam at ecs.umass.edu
Fri Jan 12 01:36:24 AEST 1990


I have a small nagging problem. 

There are a few C as well as pascal source file which are indented
by using 'space' and 'tab' both. So, whenever I do set ts=4 or whatever
in vi, the text gets misaligned. Also it produces bad print-outs if
one changes tab size.

The problem is to search for such malicious 'space' character at the
start and end of line and replace them by 'tab'. The problem gets
complicated when there is a 'tab' between 'spaces' and also
such characters before comment boxes. i.e.
e.g.

/****************************************************/
/*<space><tab> procedure foobar<tab><multiple space>*/
/*<tab><tab>..... junk <tab>........................*/

etc.

Is there any simple way to remove such spaces?
Then the code can be run thru' 'cb' and one can get proper listings.

Thanks in advance.

-satam

------------------------------------------------------------------------
Kirtikumar "Mumbaichaa" Satam
INTERNET : satam at ecs.umass.edu
BITNET : satam at umaecs.bitnet
217 Northwood Apts, Sunderland, MA 01375   Tel# 413-665-3222
------------------------------------------------------------------------



More information about the Comp.unix.questions mailing list