Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ns-mx!iowasp.physics.uiowa.edu!ceres.physics.uiowa.edu!zaphod.mps.ohio-state.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!npd.novell.com!newsun!tporczyk From: tporczyk@na.excelan.com (Tony Porczyk) Newsgroups: comp.editors Subject: switch vi modes in mapping Keywords: vi map Message-ID: <1991Feb12.235224.9934@novell.com> Date: 13 Feb 91 06:55:58 GMT Sender: news@novell.com ( Lines: 23 The News Manager) Nntp-Posting-Host: na Organization: Novell, San Jose CA. Date: Tue, 12 Feb 1991 23:52:24 GMT Quick question for vi users. When I map my F1 function keys in .exrc: map ^[OP :!clear;more .helpfile^M it works fine as long as I am in command mode. I would like to make it mode independent and be able to invoke it regardless of mode, however, placing Esc at the beggining doesn't help: map ^[OP ^[:!clear;more .helpfile^M Is there any way to make vi switch to command mode this way? If I could make multiple switches like that in one mapping, I could do wonders with that stuff (make it behave almost like my DOS editor :) Thanks, Tony