Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!pyrnj!hhb!istvan From: istvan@hhb.UUCP (Istvan Mohos) Newsgroups: comp.unix.questions Subject: tabs in vi Message-ID: <273@hhb.UUCP> Date: 23 Aug 89 21:47:28 GMT Organization: HHB Systems, Mawah, NJ Lines: 48 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. Assuming that you are interested in this transform only while in insert mode, you have two choices: Interactive mapping: hit single character______________ : (to get to the command line) type four characters______________ map! hit the following sequence of keys control-V control-V tab space control-V control-V space space space space return OR, adding the mapping by editing EXINIT under vi (in BSD .cshrc file; sysV syntax is slightly different): setenv EXINIT 'set |map\!' is entered as the following sequence of bytes: control-V control-V tab space control-V control-V space space space space -- Istvan Mohos {ihnp4,decvax,allegra}!philabs!hhb!istvan HHB Systems 1000 Wyckoff Ave. Mahwah NJ 07430 201-848-8000 ====================================================================