Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!ulysses!wmb From: wmb@ulysses.att.com (W M Brelsford) Newsgroups: comp.editors Subject: Re: VI: Positioning the cursor ("|") from within a macro doesn't work. Summary: Needs ^V; minor refinement Keywords: vi cursor Message-ID: <14977@ulysses.att.com> Date: 14 Jun 91 12:30:24 GMT References: <1501@cacilj.UUCP> Distribution: usa Organization: AT&T, Basking Ridge NJ Lines: 21 In article <1501@cacilj.UUCP>, jurgen@cacilj.UUCP (Jurgen Heymann) writes: > I am trying to position the cursor on a specific column using a :map macro. > When I enter the command string interactively everything works fine. When I > define it as a :map macro however, the position command is not executed and > the macro execution stops there at the "|". I also tried "\|" but that didn't > help either. What can I do? "|" needs to be protected with "^V" (Ctrl-V). ..(macro to join two text lines, then split before column 77): > :map ^W J77|bi^M^[ A minor modification: :map ^W J77^V|BBf r^M insures that no trailing blanks are left on the split line. Bill Brelsford AT&T, Basking Ridge NJ wmb@joplin.att.com