Path: utzoo!mnetor!uunet!mcvax!ukc!reading!onion!riddle!domo From: domo@riddle.UUCP (Dominic Dunlop) Newsgroups: comp.unix.questions Subject: Re: to space under vi, VI SUMMARY COMING SOON... Message-ID: <559@riddle.UUCP> Date: 27 Jan 88 19:11:22 GMT References: <462@gordon.UUCP> <239@unicom.UUCP> <6659@agate.BERKELEY.EDU> Reply-To: domo@riddle.UUCP (Dominic Dunlop) Organization: Sphinx Ltd., Maidenhead, England Lines: 22 Keywords: vi, tab, vi summary Summary: Yes, you can pipe buffer through tab expander, but there must be a better way... Expires: Sender: Followup-To: Distribution: In article <6659@agate.BERKELEY.EDU> shipley@web5b.berkeley.edu.UUCP (Peter Shipley) writes: >In article <239@unicom.UUCP> daniel@unicom.UUCP (Dan "I want to Ski Tam!" Smith) writes: >}Is there a way to force 'vi' editor to insert appropreiate number of spaces >}when key is hit? >What is wrong with: > > :%!unexpand [Hope I've managed to preserve correct attributions in paring that down.] Well, what's wrong with it is that you'd rather vi did the expansion itself automatically. But, failing that, if you haven't got unexpand, then :%!pr -te works as well. But I'd still like to see a more elegant fix. None has yet arrived at this machine. (I did read all received postings before jumping in, honest.) In particular, macros which map tab to a fixed nuber of spaces don't have the desired effect. -- Dominic Dunlop domo@sphinx.co.uk domo@riddle.uucp