home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!kithrup!stanford.edu!ames!haven.umd.edu!darwin.sura.net!sgiblab!sgigate!odin!fido!bedlam.asd.sgi.com!davis
- From: davis@bedlam.asd.sgi.com (Tom Davis)
- Subject: Re: Zip tab settings
- Message-ID: <oqq61b8@fido.asd.sgi.com>
- Sender: news@fido.asd.sgi.com (Usenet News Admin)
- Organization: sgi
- References: <1171@deere.com>
- Date: Thu, 20 Aug 1992 21:13:38 GMT
- Lines: 48
-
- In article <1171@deere.com>, jrh@de.deere.com (John R. Howell) writes:
- |> I read in my documentation for zip that tab stops can be set at values
- |> other than 8 using the .ziprc file. However, that doesn't really change
- |> the tab size, it still uses 8 character tabs, but will use spaces to
- |> "fake" a different tab size.
- |>
- |> I have files that get edited on other machines in addition to the sgi and
- |> I use a tab size of 4. However, no matter what I put in .ziprc, these
- |> existing tabs will be displayed as 8 character stops.
- |>
- |> Is this correct? Is there anyway around this?
- |>
-
- There is a way around it. In your .ziprc, include a line like this:
-
- hardtabsize 4
-
- In this mode, zip will advance to the column of the next multiple of 4.
- The tabsize entry in the .ziprc controls how far (in columns) the cursor
- will advance with each press of the tab key, so if you only change the
- hardtabsize to 4, pressing tab will still advance up to 8 positions (and
- may insert 2 raw tabs into the file). So if you set your hardtabsize to 4,
- you'll probably want to set your tabsize to 4 as well.
-
- |> Is there an option that says "whenever I hit the tab key, insert spaces
- |> to pad to the next tab stop"?
-
- There's a hack to do this. Just set the hardtabsize to be enormous (say 10000000),
- and zip will only insert a tab character when it needs to get to columns
- 10000000, 20000000, etc., which rarely occurs. I suppose you could get nailed
- in giant binary files ...
-
- O.K. Those are the technical details. Now for the sermon. In my experience,
- hard tab sizes of anything other than 8 will cause you no end of trouble. Too
- many other programs "know" that tabs are 8 wide. I used to think of all sorts
- of horrible things that ought to be done to people who used non-8-wide tabs, but
- in my kinder and gentler dotage, I merely think they should all be taken out and
- shot. The devil made me add hardtabsize to zip.
-
- I have no objections to using spaces exclusively, however.
-
- -- Tom Davis
-
- |>
- |> Thanks.
- |>
- |> John
- |>
-