[comp.os.msdos.programmer] Turbo C++ Editor

jdb@reef.cis.ufl.edu (Brian K. W. Hook) (01/28/91)

I have been using the turbo C++ IDE for sometime for development, and have 
found the editor to be very very nice!  HOWEVER....there is the problem 
that it constantly uses a mixture of tabs and spaces when it autoindents
and autounindents.  I have turned OPTIMAL FILL off, I have told it o use
only spaces (no tabs), and just about everything else I can think of. 
The problem occurs when you do a hardcopy print out...everything is really
skewed off where on the screen things line up and look beatutiful but
when a mixture of tabs and spaces get sent to the printer everything is 
messed up.

Basically, this causes the entire program to be almost worthless when you
print out source code.

Brian

dubner@hpspkla.spk.hp.com (Joe Dubner) (01/28/91)

> I have been using the turbo C++ IDE for sometime for development, and have
> found the editor to be very very nice!  HOWEVER....there is the problem
> that it constantly uses a mixture of tabs and spaces when it autoindents
> and autounindents.  I have turned OPTIMAL FILL off, I have told it o use
    [remainder deleted]

Brian,

I too have been very annoyed by the way the TC++ editor treats tabs,
especially when I work on a file in which someone else has used a
different tab stop setting.  As a result, I always operate with tabs off
and insist that anyone who shares files with me do the same.  If there
are no tabs in the file, printing (and editing) is as expected.

It's easy to have tabs ON when you think they're OFF -- there are so
many ways that TC++ derives its configuration information (TCINST,
TCCONFIG.TC, .PRJ file, etc).  Assuming that you have it configured
correctly for tabs OFF, it sounds like your problem is due to tabs
already being in the file.  (Turning them off does not remove existing
ones).

You can expand all tabs in a source file with a simple utility.  One
that has been available from various sources since "day one" is
TABSPC.COM.  I wrote my own in C and I'll Email it to you if you like.


Regards,
Joe

--------------------------------------------------------------------------
Joe Dubner     K7JD  |  Hewlett Packard Company  |  dubner@hpspkla.HP.COM
                     |  TAFC-34         M.S. 2I  |   (509) 921-3514 
                     |  Spokane, WA  99220       |
--------------------------------------------------------------------------

rdw2030@venus.tamu.edu (01/29/91)

In article <6060004@hpspkla.spk.hp.com>, dubner@hpspkla.spk.hp.com (Joe Dubner) writes...
>You can expand all tabs in a source file with a simple utility.  One
>that has been available from various sources since "day one" is
>TABSPC.COM.  I wrote my own in C and I'll Email it to you if you like.
>Regards,
>Joe

Even easier than this is doing a literal search and replace of the ^I character
from within the Turbo C editor.  If you are familiar at all with WordStar, the
Turbo C editor emulates it to a T (whatever that means!)  :-)

All you have to do is type ^Q^A and enter (I think!) ^P to enable you to enter
a literal.  You have to hit ^P for each literal, not just once for a whole
string.  Then when it asks you what to replace each tab with, just hit some 
spaces (I use 3).  Then shut off your tabs and you should be good to go!

Turbo C++ gives you an entire window full of information and options for the
replace, so you should be able to figure it out.

Good luck!

Mark C. "Bro!" Lowe - KB5III