Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!hpcea!hpfcdc!hpldola!hplsdly!hplsdlw!was From: was@hplsdlw.HP.COM (William A. Stubblebine) Newsgroups: comp.unix.questions Subject: Re: Replacing tabs in vi Message-ID: <3050001@hplsdlw.HP.COM> Date: Mon, 19-Jan-87 00:27:29 EST Article-I.D.: hplsdlw.3050001 Posted: Mon Jan 19 00:27:29 1987 Date-Received: Wed, 21-Jan-87 22:46:54 EST References: <936@tekla.UUCP> Organization: HP Logic Systems Division R&D LAB - Col Spgs, CO Lines: 24 randy@tekla.UUCP (Randy Gibbons) asks: > Is there a way in vi to have spaces rather than tabs placed in the text. Unfortunately, vi has an annoying tendency to auto-indent using tabs. I don't know of a way to disable this (mis) feature. However, once the tabe are in the file, you can remove them (i.e., replace with the equivalent number of spaces) easily using the following vi commands: 1G (top of file) !Gcol -x (replace contents of file with detabbed output of col -x) Of course, in the above example, any motion symbol (H,L,}, etc.) can be substituted for G to localize the substitution Bill Stubblebine Hewlett-Packard Logic Systems Div. 1900 Garden of the Gods Rd. Colorado Springs, Co. 80907 ...!ihnp4!hpfcla!hpldola!was (303) 590-3072