jlw@ariel.UUCP (J.WOOD) (01/21/86)
Apologies for the prior posting. Netnews ate all my control characters. Please translate from ^control format back to the true control characters. The only one that may be obscure is ^[ which equates to esc. Until now I have resisted the use of vi mainly because there were too many picky little commands to remember. I have recently become the proud user of an AT&T UNIX PC with the enhanced editing package which includes vi. I have prepared a .exrc file that I use to map the keys of my UNIX PC to useful things in vi. The remainder of this note is a synopsis of the keys followed by the actual .exrc file. The order that I will discuss these mappings is in the same order that they appear in the .exrc file. I have arranged the file with the left action keys first with the unshifted usage and the shifted usage going left to right then down. Next I have the right action keys in the same manner. I have done nothing with the function keys because I don't know how to enable them and write labels into them from within vi. Some keys like Move and Copy I cannot figure what to do with in any event so I effectively No-Op'ed them. If you make your own additions or changes, be very careful especially around the Rstrt, Save, and Exit keys. There is a trimmed version of the .exrc file tagged on to the end of the primary one. It turns out that there are some make options to vi one of which, the VMUNIX one, controls the amount of macro text and the number of macros. In trying to port this to a VAX, I found several different error messages. The worst was the infamous 'Bus Error - Core Dumped.' I also got 'Too Many Macros,' and 'Too Much Macro Text.' This last one I still get, but it doesn't seem to bother anything. I have cribbed out the unixpc portion of /etc/termcap on the UNIX PC as well as /usr/lib/ua/kmap.s4 and sent them up to the VAX. I set the TERMCAP shell variable and export it. I have fixed up the termcap file to point to the kmap.s4 file. This is all for System V R0. In System V R2 all you need is the .exrc file as trimmed. For the earlier version of System V I set the TERM shell variable to unixpc as in the termcap file. For th later version of System V use the ansi terminal from the terminfo database. Joseph L. Wood, III AT&T Information Systems Laboratories, Middletown (201) 957-5475 <ariel!>titania!jlw Clear Line Delete to end of line S-Clear Line Delete to end of line Ref Reread current file Rstrt Reread current file Creat No-Op S-Creat No-Op Save Write buffer to current file S-Save Write buffer to current file Undo Undo last editing command S-Undo Undo all previous commands on current line Redo Repeat last editing command S-Redo Repeat last Find or S-Find Find Search Forward for <string>cr S-Find Search backwards for <string>cr Replace Substitute String for current character S-Replace Substitute String for current entire line Move No-Op S-Move No-Op Copy No-Op S-Copy No-Op Dlete Delete current line from position S-Dlete Delete current line entirely Dlete Char Delete current character S-Dlete Char Delete current word Mark No-Op Slect No-Op Input Mode Append after current character S-Input Mode Insert before current character Exit Quit without writing S-Exit Quit after a write Msg S-Msg Help S-Help Suspd S-Suspd Rsume S-Rsume Opts S-Opts Cmd S-Cmd Close Open Open new line below current line and append Cancl S-Cancl Print S-Print Clear Redraw Screen Rfrsh Redraw Screen Page Page Forward S-Page Page Backward Beg Move cursor to beginning of current page S-Beg Move cursor to middle of current page Home Move cursor to beginning of current page S-Home Move cursor to beginning of document End Move cursor to end of current page S-End Move cursor to end of document Prev Move cursor to beginning of previous word S-Prev Move cursor to beginning of previous word Up Arrow Move cursor up to character above current character Roll Up Scroll Document up Next Move cursor to beginning of next word S-Next Move cursor to beginning of next word Left Arrow Move Cursor one character to left S-Left Arrow Move cursor to beginning of current line Down Arrow Move cursor down to character below current character Roll Down Scroll Document down Right Arrow Move cursor one character to the right S-Right Arrow Move cursor to end of current line ----------------cut here for .exrc--------------- :map ^[Oa d$ :map ^[OA d$ :map ^[Ob :e!^V :map ^[OB :e!^V :map ^[On ^G :map ^[ON ^G :map ^[Oo :w!^V :map ^[OO :w!^V :map ^[Os u :map ^[OS U :map ^[Ot n :map ^[OT . :map ^[Ox / :map ^[OX ? :map ^[Oy s :map ^[OY cc :map ^[Nc ^G :map ^[NC ^G :map ^[Nd ^G :map ^[ND ^G :map ^[Ne D :map ^[NE dd :map ^[Nf x :map ^[NF dw :map ^[Ni ^G :map ^[NI ^G :map ^[Nj a :map ^[NJ i :map ^[Ok :q!^V :map ^[OK ZZ :map ^[Ov o :map ^[Na ^L :map ^[[J ^L :map ^[[U ^F :map ^[[V ^B :map ^[9 H :map ^[NB M :map ^[[H H :map ^[NM 1G :map ^[0 L :map ^[NN $G :map ^[Ng B :map ^[NG B :map ^[[A k :map ^[[T ^Y :map ^[Nh W :map ^[NH w :map ^[[D h :map ^[NK ^ :map ^[NK 0 :map ^[[B j :map ^[[S ^E :map ^[[C l :map ^[NL $ ---------------------cut here for trimmed version----------------- :map ^[Oa d$ :map ^[Ob :e!^V :map ^[Oo :w!^V :map ^[Os u :map ^[Ot n :map ^[Ox / :map ^[Ne dd :map ^[Nf x :map ^[Nj a :map ^[Ok :q!^V :map ^[Na ^L :map ^[[U ^F :map ^[[V ^B :map ^[9 M :map ^[[H H :map ^[NM 1G :map ^[0 L :map ^[NN $G :map ^[Ng B :map ^[[T ^Y :map ^[Nh W :map ^[NH w :map ^[NK ^ :map ^[NK 0 :map ^[[S ^E :map ^[NL $