tabs in vi

David T. Sandberg dts at quad.uucp
Thu Aug 24 15:59:11 AEST 1989


In article <2068 at marvin.Solbourne.COM> dce at Solbourne.com (David Elliott) writes:
>In article <36790001 at hpindwa.HP.COM> sgordon at hpindwa.HP.COM (Shaun Gordon) writes:
>>> Is there a way to make it so that when ever I hit the TAB key
>>> in 'vi' that I get 4 spaces rather than an actual tab?
>
>I think all solutions to this assume that "I get 4 spaces" really means
>"I get to the next column for which column%4 == 0".  To get exactly
>4 spaces for a tab is pretty hard in the general case, since it's
>hard to map tab and hard to get spaces in the mapping.

Right, but I'm fairly certain that the idea was to end up with no
tabs in the file.  I recently ran into a situation where this would
have been helpful; I had a text file which I wanted to edit mostly
with vi, but also wanted to load into Uniplex on occasion.  Editing
the file without using the tabstops was bordering on ridiculous, and
even if the system had featured an "expand", I wouldn't have wanted
to run the file through the filter several times a day.

Unfortunately, I arrived at the conclusion that there was no really
good way to accomplish this.

-- 
                                  David Sandberg - Quadric Systems
  "Strike Hard, Strike Sure"      PSEUDO: dts at quad.uucp
    Bomber Command, R.A.F.        ACTUAL: ..uunet!rosevax!sialis!quad!dts



More information about the Comp.unix.questions mailing list