Newsgroup: alt.hackers


Newsgroups: alt.hackers
Path: icdoc!dds
From: dds@doc.ic.ac.uk (Diomidis Spinellis)
Subject: Re: Quick-and-dirty hypertext
Nntp-Posting-Host: skid.doc.ic.ac.uk
Message-ID: <1991Nov27.161323.4758@doc.ic.ac.uk>
Summary: A macro is enough
Approved: dds@doc.ic.ac.uk (Diomidis Spinellis)
Organization: Dept. of Computing, Imperial College, London, England
Keywords: vi macro hack
Date: Wed, 27 Nov 1991 16:13:23 GMT
References: <1991Nov26.233027.22840@microsoft.com>
Lines: 23
Content-Length: 1028
In article <1991Nov26.233027.22840@microsoft.com> steveha@microsoft.UUCP (Steve Hastings) writes:

....of a way to do quick-and-dirty hypertext by using a hacked-to-death
version of vi that can interpret the output of grep -n pattern files /dev/null:

>But the beauty part is a feature of the proprietary vi I use.  It is a
>command that looks at the beginning of the line the cursor is on, parses
>out a filename and loads it; it attempts to parse out a line number, and if
>it finds one, it goes to that line number.

Obligatory hack:
What is wrong with using the following vi macro:

map , 0dt:o^[PI:e! ^[k0ldt:jA^M:^[$pA^M^[kk"qdj@q

(Change ^X to control-X when you enter it into your .exrc file.  View the
file output of grep -n and press , on the line you want to visit.)

Diomidis
-- 
Diomidis Spinellis                  Internet:                 dds@doc.ic.ac.uk
Department of Computing             UUCP:                    ...!ukc!icdoc!dds
Imperial College, London SW7        #include "/dev/tty"



Newsgroup alt.hackers contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.