Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!cernvax!ethz!ethz-inf!wyle From: wyle@inf.ethz.ch (Mitchel Wyle) Newsgroups: comp.unix.questions Subject: Re: tabs in vi Message-ID: <1108@ethz-inf.UUCP> Date: 24 Aug 89 08:02:56 GMT References: <7901@ardent.UUCP> Reply-To: wyle@ethz.UUCP (Mitchel Wyle) Organization: ETH Zurich Lines: 25 In article <7901@ardent.UUCP> landay@ardent.com (James A. Landay) 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 would >rather not have to run expand after running vi, as I would only >want to do that if I actually changed the file. >landay@ardent.com You probably want something more complicated than what you specified. What you just specified can be done with map! ^V^I or abbr instead of map! What you want is something which will ALIGN columns with spaces, using tab-stops every 4 spaces. I use tabs while I'm typing, then pipe the file through expand(1) to get spaces before saving or every so often. I suspect that expand can take params about how wide tab-stops are, etc. Any solutions which are more elegant?? -Mitch