[net.unix] vi tabs

sde@mitre-bedford.ARPA (01/03/85)

A vi question (they don't give out complete manuals here, it seems):
How can one get vi to cease putting actual tab chars into files?
Thanx in advance.

David   sde@mitre-bedford

rad@mitre-bedford.ARPA (01/04/85)

>A vi question (they don't give out complete manuals here, it seems):

  Give me a break.  We hand out everything that comes from Bezerkley.
Did you know enough to ask the librarian for the ex documentation too?

>How can one get vi to cease putting actual tab chars into files?

  If you type tab characters into a file, vi will put them there.  If
you want auto-indenting without using the physical tab key, check out
the autoindent feature (which uses control-t and control-d for tabbing
and detabbing at specifiable sizes).  Use another Unix utility, called
"expand", to change tabs to spaces.  You can even bind a macro to a
vt100 function key to "expand" the entire file.  Put this in a .exrc
file in your home directory:

map #4 1!Gexpand^M

where the ^M is a carriage return inserted into the .exrc file by
preceding it with a control-V.  Hitting PF4 (at the upper right hand
corner of the keyboard) will then kill all of the tabs in your file,
with the minor side affect that the cursor will be placed at the
beginning of your file.

Dick Dramstad
rad@mitre-bedford.arpa

sde@mitre-bedford.ARPA (01/04/85)

Thank you for the pointing out the expand filter.  I looked up tab[s],
etc. but didn't think of that keyword.

  |>A vi question (they don't give out complete manuals here, it seems):
  |  Give me a break.  We hand out everything that comes from Bezerkley.
  |Did you know enough to ask the librarian for the ex documentation too?

I had asked for all documentation on vi and had received:
	Edit: A Tutorial   (21 pages)
	Ex: Reference Manual (19+3 pages)
	An Introduction to Display Editing with Vi (30 pages),
and was told that that was all that was HERE.
Since it seemed reasonable that something like a Vi reference manual exist
somewhere, my parenthetical comment was a statement of observation (and
perhaps should have included "absit invidia"), along the lines of RAH's
"fair witness" idea.  It may be that I should have said that no complete
manuals are available, but I cannot bear witness to that statement, only to
the weaker remark that I made.

By the way, I have used editors that allowed one to specify that tabs were
immediately converted to spaces on input, though I am perfectly willing to
kludge things with expand, if that's the only way to do it.

  |>How can one get vi to cease putting actual tab chars into files?
  |  If you type tab characters into a file, vi will put them there.  

And as you noted, if one makes use of autoindentation, one is effectively
typing tab chars.

	Absit Invidia,
	David   sde@mitre-bedford

chip@t4test.UUCP (Chip Rosenthal) (01/19/85)

> From: sde@mitre-bedford.ARPA
> Date: 3 Jan 85 23:28:31 GMT
> 
>   |>A vi question (they don't give out complete manuals here, it seems):
>   |  Give me a break.  We hand out everything that comes from Bezerkley.
>   |Did you know enough to ask the librarian for the ex documentation too?
> 
> I had asked for all documentation on vi ...
> and was told that that was all that was HERE.

No matter how you cut it, the vi documentation is horrendous document for
learning vi.  It isn't that it is so much worse than the rest of the Unix
documentation (which is pretty poor in general), but is a very important
program and deserves better.

Since we are running Eunice over VMS here, users have the option of using
EDT.  Too many people do.  ("But vi is so confusing...")

If anybody has a pointer to a good book or article on vi, I'm all ears.

-- 

Chip Rosenthal, Intel/Santa Clara
{cbosgd,idi,intelca,icalqa,kremvax,qubix,ucscc} ! {t4test,t12tst} ! {chip,news}

pag@hao.UUCP (Peter Gross) (01/23/85)

> Since we are running Eunice over VMS here, users have the option of using
> EDT.  Too many people do.  ("But vi is so confusing...")
> 
> If anybody has a pointer to a good book or article on vi, I'm all ears.
> 
> -- 
> 
> Chip Rosenthal, Intel/Santa Clara
> {cbosgd,idi,intelca,icalqa,kremvax,qubix,ucscc} ! {t4test,t12tst} ! {chip,news}

We have found that the vi learn script included in the user-supplied software
of 4.2bsd is a very good teaching tool.  It ported easily to our v7 11/70.

--peter gross
hao!pag