Article View: net.text
Article #939Re: "vi" questions
From: Comfy chair
Date: Thu, 19 Jun 1986 23:42
Date: Thu, 19 Jun 1986 23:42
26 lines
1433 bytes
1433 bytes
|1) Two (or more) blank lines, one after the other.
|
|2) A line longer than "n" characters.
|
|(For the former, I've tried various combinations of ^$ and
|Ctrl-V-Return, but none have worked. For the latter, I would suppose
|that "/^(81 dots)$" would find lines over 80 characters long, but
|that is hardly practical. I would expect there to be a more elegant
|solution... :-)
This looks like a job for... Superchicken, er, awk.
vi:
(1) vi can't match across lines, so no joy.
(2) There is no counted form of the * operator.
awk:
(1) Have a variable remember previous line was blank.
(2) See builtin 'length'.
You may also want to print out the line number for use later.
Ken
--
UUCP: ..!{allegra,decvax,seismo}!rochester!ken ARPA: ken@rochester.arpa
Snail: CS Dept., U. of Roch., NY 14627. Voice: Ken!
Technical Details
Message-ID:
<19016@rochester.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!topaz!harvard!seismo!rochester!kenReferences:
<1273@brl-smoke.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!topaz!harvard!seismo!rochester!ken From: ken@rochester.ARPA (Comfy chair) Newsgroups: net.text Subject: Re: "vi" questions Message-ID: <19016@rochester.ARPA> Date: Thu, 19-Jun-86 19:42:15 EDT Article-I.D.: rocheste.19016 Posted: Thu Jun 19 19:42:15 1986 Date-Received: Sat, 21-Jun-86 10:26:24 EDT References: <1273@brl-smoke.ARPA> Reply-To: ken@rochester.UUCP (Comfy chair) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 26 Keywords: vi lines search