Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!xanth!lll-winken!ubvax!ardent!mrk!landay From: landay@mrk.ardent.com (James A Landay) Newsgroups: comp.unix.questions Subject: Re: tabs in vi Message-ID: <7936@ardent.UUCP> Date: 23 Aug 89 18:10:47 GMT References: <7901@ardent.UUCP> <36790001@hpindwa.HP.COM> Sender: news@ardent.UUCP Reply-To: landay@mrk.ardent.com (James A Landay) Organization: Ardent Computer Corp., Sunnyvale, CA Lines: 34 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 would >> rather not have to run expand after running vi, as I would only >> want to do that if I actually changed the file. > >While inside vi you can type a colon to get to the command line and then enter: > >set tabstop=4 > >If you want tabs to default to 4 you should create a file .exrc in you home >directory (if it doesnt already exist) and put the set command in it. It >should look like it does above (i.e. no colon.) > This solution does not have the desired result. It just causes TABs to be displayed as 4 blanks when I'm in vi. When other people look at the file or cat or more, etc... it will come out as 8 spaces. I want vi to insert 4 blanks whenever I type TAB, not an actual TAB character. James landay@ardent.com or landay@cory.berkeley.edu * *