Date: Thu, 15 Jul 1999 08:57:41 +1200 (NZST) From: Jonathan Chen <jonc@pinnacle.co.nz> To: Mark Ovens <markov@globalnet.co.uk> Cc: Anand Buddhdev <arb@anand.org>, freebsd-questions@FreeBSD.ORG Subject: Re: key mapping in vi/nvi Message-ID: <Pine.SC5.4.10.9907150855320.28914-100000@kiwi.pinnacle.co.nz> In-Reply-To: <19990714183835.A269@marder-1>
next in thread | previous in thread | raw e-mail | index | archive | help
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. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SC5.4.10.9907150855320.28914-100000>