Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!csd4.csd.uwm.edu!uxc.cso.uiuc.edu!tank!uwvax!umn-d-ub!umn-cs!nis!quad!dts From: dts@quad.uucp (David T. Sandberg) Newsgroups: comp.unix.questions Subject: Re: tabs in vi Message-ID: <242@quad.uucp> Date: 24 Aug 89 05:59:11 GMT References: <7901@ardent.UUCP> <36790001@hpindwa.HP.COM> <2068@marvin.Solbourne.COM> Reply-To: dts@quad.uucp (David T. Sandberg) Organization: Quadric Systems, Richfield MN Lines: 25 In article <2068@marvin.Solbourne.COM> dce@Solbourne.com (David Elliott) writes: >In article <36790001@hpindwa.HP.COM> sgordon@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@quad.uucp Bomber Command, R.A.F. ACTUAL: ..uunet!rosevax!sialis!quad!dts