Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!sarah!cs.albany.edu!crdgw1!uakari.primate.wisc.edu!dali.cs.montana.edu!ogicse!ucsd!mvb.saic.com!unogate!unocal!genisco!arcturus!felix!asylvain@felix.UUCP From: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Newsgroups: comp.editors Subject: Re: VI: Positioning the cursor ("|") DOES work!! Keywords: vi cursor Message-ID: <165561@felix.UUCP> Date: 20 Jun 91 03:22:12 GMT References: <14977@ulysses.att.com> <165175@felix.UUCP> <165192@felix.UUCP> <1991Jun18.000454.6342@vpnet.chi.il.us> Sender: daemon@felix.UUCP Reply-To: asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) Distribution: usa Organization: Foundation for the Increased Wealth of Chipmunks Send in your pledges now! (Visa/Mastercard accepted) Lines: 38 Written in article <1991Jun18.000454.6342@vpnet.chi.il.us> by dattier@vpnet.chi.il.us (David W. Tamkin): > asylvain@felix.UUCP (Alvin "the Chipmunk" Sylvain) wrote in <165192@felix.UUCP>: > | a enter append mode, so you can add ... > | ^V^M ... a carriage return, quoted of course with ^V. > | J Join the next line to the end of the new next line. > > You must have some really strange vi. After a^V^M you should still be in > append mode and the J should be taken as additional text to add. It > shouldn't work as a join command unless you have ^V^[ in the mapping to > return to command mode. You're absolutely right, of course. You need an ESCape to leave append mode and return to "beep" mode. That should have been "^V^M^[". I was so excited at having discovered a solution to a problem that had been nagging me for a long time, I got careless. > In my own macro for it, I don't bother with hyphens but look only for spaces. > That allows me to use this: > > :map whateverkeyyouwant 77^V^V|F r^V^M > > The space doesn't seem to need quoting. This is true. The space won't need quoting. I write lots of stuff with hyphens and slashes etc., so I have a partic- ular need for those kinds of word breaks. Therefore, instead of "F ", I have "?[- /]^V^M". Instead of replacing the space with a CR, I just add the CR after what may be a space, a hyphen, or a slash. This will prop- erly word break mother-in- law, input/ output, as well as normal space separated words. I use "nroff" to break between syllables. I don't use it often, because of the subshell overhead, but occasionally it gives the nicest-looking result.