Re: vi search results positioning

From: Dr. Tom Blinn, 603-881-0646 <tpb_at_zk3.dec.com>
Date: Fri, 20 Jan 95 12:37:05 -0500

> Here's a little annoyance I've observed under the last several releases of
> OSF/1 up to and including 2.1. In vi(1), if I search downwards in a file,
> vi redraws the screen so that the found line is in the middle of the screen.
> If I search upwards, vi redraws the screen so that the found line is at the
> top of the screen. I would rather it always positioned the found line in the
> middle of the screen (assuming of course that there are enough lines above
> and below the found line). Is there a way to make vi do that?

Gee, there must be a way, because when I just tried it (on V2.0) it did what
you say you want. And I'm no vi wizard.

My vi settings (mostly defaults) are as follows, and I run vi in an xterm,
which MIGHT make a difference..

:set all
noautoindent nomodeline noshowmode
autoprint nonumber noslowopen
noautowrite nonovice nosourceany
nobeautify nooptimize tabstop=8
closepunct='".,;)]} paragraphs=IPLPPPQPP LIpplpipbp taglength=0
directory=/var/tmp partialcharacter=- tags=tags /usr/lib/tags
noedcompatible prompt term=xterm
noerrorbells noreadonly noterse
noexrc redraw timeout
flash remap ttytype=xterm
hardtabs=8 report=5 warn
noignorecase scroll=23 window=47
nolisp sections=NHSHH HUuhsh+c wrapscan
nolist shell=/bin/csh wrapmargin=44
magic shiftwidth=2 nowriteany
mesg noshowmatch wraptype=word

The differences I see are I don't use autoindent by default, I have my
window and scroll set larger (because that's how my xterm is set), I use a
wrapmargin, I have my shiftwidth set to 2, and the path to my shell is not
the same as yours. On my system, there is no /usr/lib/tags file, and I do
not have a tags file in my home or working directory. I use '?' to start
or continue a backward search.

Tom
 
 Dr. Thomas P. Blinn, UNIX Software Group, Digital Equipment Corporation
  110 Spit Brook Road, MS ZKO3-2/U20 Nashua, New Hampshire 03062-2698
   Technology Partnership Engineering Phone: (603) 881-0646
    Internet: tpb_at_zk3.dec.com Digital's Easynet: alpha::tpb

  Worry kills more people than work because more people worry than work.

     My favorite palindrome is: Satan, oscillate my metallic sonatas.
                                         -- Phil Agre, pagre_at_ucsd.edu

  Opinions expressed herein are my own, and do not necessarily represent
  those of my employer or anyone else, living or dead, real or imagined.
 
Received on Fri Jan 20 1995 - 12:37:48 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT