Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!agate!darkstar!ucscb.UCSC.EDU!funkstr From: funkstr@ucscb.UCSC.EDU (Larry Hastings) Newsgroups: comp.editors Subject: Re: Yet another screen editor Keywords: new editor Message-ID: <11292@darkstar.ucsc.edu> Date: 19 Jan 91 13:16:35 GMT References: <1991Jan16.230527.3200@cs.uiuc.edu> <3879@pta.oz.au> <1991Jan19.035637.10236@cs.uiuc.edu> Sender: usenet@darkstar.ucsc.edu Organization: Knowledge Dynamics Corporation Lines: 30 +-In article <1991Jan19.035637.10236@cs.uiuc.edu>, | joshi@cs.uiuc.edu (Anil Joshi) wrote: | | I tried using fmt to do formatting of | cursor to end of paragraph. It formatted the whole document. | +---------- Well, I'm not sure how you called "fmt", but it works great for me... as I have the following line in my .exrc: map F mz{!}fmt -79^M'z (Note that the ^M is actually a control-m, entered in vi by control-v followed by control-m. You'll have to fix that by hand on your end.) This moves the cursor to the beginning of the current paragraph, and causes vi to call "fmt -79" on the following paragraph. This macro also makes a futile attempt to save and restore the cursor position (which just about never works). It's mapped to "F", which is normally used to search backwards on the line for a character, but I never use it (if I need that I use T anyway). Makes my life much better... Just make sure that the two paragraphs are separated by whitespace lines, and it'll work great. -- larry hastings, the galactic funkster, funkstr@ucscb.ucsc.edu I don't speak for Knowledge Dynamics or UC Santa Cruz, nor do they speak for me