tabs in vi

James A Landay landay at mrk.ardent.com
Thu Aug 24 04:10:47 AEST 1989


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 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 at ardent.com
or
landay at cory.berkeley.edu






*
*



More information about the Comp.unix.questions mailing list