Subject: vi map question
To: None <netbsd-users@netbsd.org>
From: Peter Bex <Peter.Bex@student.kun.nl>
List: netbsd-users
Date: 09/24/2003 21:16:59
--NqSa+Xr3J/G6Hhls
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello all,

I mapped the following combo to a key to more easily edit kernel config fil=
es:
I, #, escape, j
Now I can easily modify GENERIC to comment out those things I do not need (=
just
hit the mapped key on a line you wish to comment out).
(For the newbies who dig this trick: It is accomplished by typing
:map MYKEY I#^V^[j
Of cours)

The question is this:
How can I make this mapping behave as one would want it to behave 'n times'=
 by
typing a number before the mapped key?

Example: assuming I bound the combo to q, typing '10q' just gives me 10 hash
signs on the line and scrolls down to the next line. This is to be expected,
since prefixing a number to 'i' or 'I' inserts that many instances of the
typed string. (after which it just goes to the next line, once)

Regards,
Peter
--=20
http://www.student.kun.nl/peter.bex
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

--NqSa+Xr3J/G6Hhls
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/ce2rLg33BXzVMqsRAjvMAJ9tfz+97n+VcP0j0F8OVQPn1weCPQCgi4wQ
j+RyzwlvipKU+8XemqqtCEg=
=eeD4
-----END PGP SIGNATURE-----

--NqSa+Xr3J/G6Hhls--