[3664] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: vi and number pad

daemon@ATHENA.MIT.EDU (Mike Sangrey)
Sat Nov 9 22:31:43 1996

To: redhat-list@redhat.com
CC: Mark Menard <mark@capital.net>
In-reply-to: Your message of "Fri, 08 Nov 1996 00:08:40 EST."
             <Pine.LNX.3.94.961108000717.6230E-100000@www.netgoth.com> 
Date: Sat, 09 Nov 1996 22:28:57 -0500
From: Mike Sangrey <mike@sojurn.lns.pa.us>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Mark Menard wrote:
> 
> Does anyone know if there is a way to get the number pad working in the vi
> that comes with Red Hat 3.0.3 and Red Hat 4.0. I have a person that does a
> lot of numerical entry in vi and using the top row is driving him nuts.
> 
> Any help appreciated,
> 

One quick way is to create a .exrc file in their home directory.  Put lines 
like:

   map! ^[Oq 1
   map! ^[Or 2
   map! ^[Os 3

etc in it.  The way to get this is to

vi .exrc
<NumLock>
i
map! <CTRL-V>1 1<ENTER>
map! <CTRL-V>2 2<ENTER>
map! <CTRL-V>3 3<ENTER>

and so on.  The string "map!" says to map the following sequence, which will 
be the string "<ESC>1", to the the next sequence, which will be the string 
"1".  The exclamation point means "do this mapping in insert mode."



-- 
  Mike Sangrey	<mike@sojurn.lns.pa.us>	(Home)
		<Mike.Sangrey@specmarkmet.com>(Work)
	"I've trademarked `William Della Croce, Jr.(tm)'.
		  Anyone using this name owes me $1,000,000."



--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post