Date: Wed, 14 Jul 1999 23:56:41 +0100 From: Mark Ovens <markov@globalnet.co.uk> To: Jonathan Chen <jonc@pinnacle.co.nz> Cc: Anand Buddhdev <arb@anand.org>, freebsd-questions@FreeBSD.ORG Subject: Re: key mapping in vi/nvi Message-ID: <19990714235641.D524@marder-1> In-Reply-To: <Pine.SC5.4.10.9907150855320.28914-100000@kiwi.pinnacle.co.nz>; from Jonathan Chen on Thu, Jul 15, 1999 at 08:57:41AM %2B1200 References: <19990714183835.A269@marder-1> <Pine.SC5.4.10.9907150855320.28914-100000@kiwi.pinnacle.co.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 15, 1999 at 08:57:41AM +1200, Jonathan Chen wrote: > On Wed, 14 Jul 1999, Mark Ovens wrote: > > > On Wed, Jul 14, 1999 at 10:41:55AM +0300, Anand Buddhdev wrote: > > > I've been trying to do some key mapping in vi, but I'm stuck. I can > > > associate simple letters to words, eg. map n anand, so that a press of > > > 'anand' will instead send 'anand' to the editor. However, I want to > > > associate the function keys F1 to F12 with various more complex macros, > > > for example a substitution macro, like: > > > > > > F1 = s/From: Anand Buddhdev <arb@anand.org>/From: postmaster/ > > > > > > > Try: > > > > map ^[OP :s/From: Anand Buddhdev <arb@anand.org>/From: postmaster/^M > > The more portable way is to use > > map #1 :s/From: Anand Buddhdev <arb@anand.org>/From: postmaster/^M > > which will read the terminfo/termap files for function key mappings. > Function keys #1 - #12 correspond to F1 - F12. > BTW, is there any way to add comment lines in ~/.exrc? I've tried most characters but it either bitches and doesn't read subsequent lines, or core dumps. > Jonathan Chen > --------------------------------------------------------------------- > Who dares nothing, need hope for nothing > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > -- FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://www.users.globalnet.co.uk/~markov _______________________________________________________________ Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK CAD/CAM solutions for Sheetmetal Working Industry mailto:markov@globalnet.co.uk http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990714235641.D524>