Path: utzoo!mnetor!uunet!husc6!panda!teddy!jpn From: jpn@teddy.UUCP (John P. Nelson) Newsgroups: comp.unix.questions Subject: Re: to space under vi, VI SUMMARY COMING SOON... Message-ID: <4596@teddy.UUCP> Date: 22 Jan 88 21:16:48 GMT References: <462@gordon.UUCP> <239@unicom.UUCP> Reply-To: jpn@teddy.UUCP (John P. Nelson) Organization: GenRad, Inc., Concord, Mass. Lines: 18 Keywords: vi, tab, vi summary >>Is there a way to force 'vi' editor to insert appropreiate number of spaces >>when key is hit? > >Vi won't let you map the tab key, or I would suggest making a map! (input >mode macro) for it. Yes it will. You can use the ^V (control V) character to suppress the normal interpretation of tab as a seperator in a map. From inside vi, you can type the following keystrokes (^V is control v, ^I is tab): :map! ^V^V^I ^V^V ^V^V ^V^V ^V^V This will appear on the screen as the following. Note that two control V characters display as ^V. :map! ^V ^V ^V ^V ^V Anyway, this will map tab to 4 spaces.