tporczyk@na.excelan.com (Tony Porczyk) (02/13/91)
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
s887212@minyos.xx.rmit.oz.au (Stephen Riehm [Romulis]) (02/24/91)
tporczyk@na.excelan.com (Tony Porczyk) writes: >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 >map ^[OP ^[:!clear;more .helpfile^M this is fine but for one thing..... there are two kinds of :map's :map for command mode mappings, :map! for insert mode mappings so for your insert mode help you may like to use the following :map! ^[OP ^[:!clear;more .helpfile^M I however would use :map! ^[OP ^[:!clear;more .helpfile^M^Ma which would stop the "hit return to continue" message from waiting for you and would then continue inserting -- catchya thanx in advance under new management