Article View: comp.editors
Article #57VI - Centering Lines with Found Patterns
From: Steve Hollasch
Date: Mon, 02 Nov 1992 23:10
Date: Mon, 02 Nov 1992 23:10
20 lines
1355 bytes
1355 bytes
I'm trying to set up my .exrc so that when I do a wordsearch, the line
containing the next pattern is centered in my window. The current version I
have is the following:
map n nmzz.`z
map N Nmzz.`z
The curious thing is that on one version of vi I have, this works as long
as lines don't wrap. When it fails, though (always on another machine) it
ends up doing the word search for "mzz.`z". In fact, if I do
map n nfoo
then this will always do a wordsearch for "foo". What's going on here? How
can I set up VI so that found text is always centered in my window (as in
"z.")?
______________________________________________________________________________
Steve Hollasch Kubota Pacific Computer, Inc.
hollasch@kpc.com Santa Clara, California
Technical Details
Message-ID:
<1992Nov2.231052.24870@kpc.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!cs.utexas.edu!sdd.hp.com!saimiri.primate.wisc.edu!ames!decwrl!decwrl!news.kpc.com!kpc!hollaschShow Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!swrinde!cs.utexas.edu!sdd.hp.com!saimiri.primate.wisc.edu!ames!decwrl!decwrl!news.kpc.com!kpc!hollasch From: hollasch@kpc.com (Steve Hollasch) Subject: VI - Centering Lines with Found Patterns Message-ID: <1992Nov2.231052.24870@kpc.com> Summary: My solution only partly works; don't know why Sender: usenet@kpc.com Organization: Kubota Pacific Computer, Inc. Date: Mon, 2 Nov 1992 23:10:52 GMT Lines: 20