Article View: comp.editors
Article #2808VI: Positioning the cursor ("|") from within a macro doesn't work.
From: Jurgen Heymann
Date: Wed, 12 Jun 1991 16:12
Date: Wed, 12 Jun 1991 16:12
28 lines
1605 bytes
1605 bytes
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?
I know I could just say "077l" to go to column 77 but that only works when
there are no tabs in that line.
What I really want application-wise is this: Since I have to write
documentation in vi, and I edit passages sometimes, I want to have a command
string that gives me 'full lines' again in a paragraph. Thus I need a command
string that appends the next line to the current ("J") then goes to the right
margin, goes to the beginning of the word there and splits the line at that
point. When you have
:map ^W J77|bi^M^[
^W would fill up the current line and go to the next.
Any ideas? Thanks
-- Jurgen
--
----------------------------------------------------------------
Jurgen Heymann CACI Products
jurgen@cacilj.cts.com 3344 N. Torrey Pines Ct
La Jolla, CA 92037
Technical Details
Message-ID:
<1501@cacilj.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!mips!spool.mu.edu!uunet!cacilj!jurgenShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!dimacs.rutgers.edu!mips!spool.mu.edu!uunet!cacilj!jurgen
From: jurgen@cacilj.UUCP (Jurgen Heymann)
Newsgroups: comp.editors
Subject: VI: Positioning the cursor ("|") from within a macro doesn't work.
Keywords: vi cursor
Message-ID: <1501@cacilj.UUCP>
Date: 12 Jun 91 16:12:44 GMT
Distribution: usa
Organization: CACI Products Company, La Jolla, CA
Lines: 28