Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!wanginst!ucadmus!harvard!seismo!brl-tgr!tgr!rad@mitre-bedford.ARPA From: rad@mitre-bedford.ARPA Newsgroups: net.unix Subject: Re: vi tabs Message-ID: <6948@brl-tgr.ARPA> Date: Thu, 3-Jan-85 18:25:10 EST Article-I.D.: brl-tgr.6948 Posted: Thu Jan 3 18:25:10 1985 Date-Received: Sat, 5-Jan-85 23:43:27 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 26 >A vi question (they don't give out complete manuals here, it seems): Give me a break. We hand out everything that comes from Bezerkley. Did you know enough to ask the librarian for the ex documentation too? >How can one get vi to cease putting actual tab chars into files? If you type tab characters into a file, vi will put them there. If you want auto-indenting without using the physical tab key, check out the autoindent feature (which uses control-t and control-d for tabbing and detabbing at specifiable sizes). Use another Unix utility, called "expand", to change tabs to spaces. You can even bind a macro to a vt100 function key to "expand" the entire file. Put this in a .exrc file in your home directory: map #4 1!Gexpand^M where the ^M is a carriage return inserted into the .exrc file by preceding it with a control-V. Hitting PF4 (at the upper right hand corner of the keyboard) will then kill all of the tabs in your file, with the minor side affect that the cursor will be placed at the beginning of your file. Dick Dramstad rad@mitre-bedford.arpa