Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cuae2!ltuxa!we53!sw013b!dj3b1!killer!ndmce!pollux!infotel!ut-ngp!ut-sally!seismo!columbia!rutgers!sri-spam!nike!ucbcad!ucbvax!decvax!mcnc!ece-csc!uvacs!edison!steinmetz!barnettb From: barnettb@vdsvax.uucp@ndmce.uucp (Barnett Bruce G) Newsgroups: net.unix Subject: Re: Things that could be done to improve vi Message-ID: <299@ndmce.uucp> Date: Fri, 17-Oct-86 16:59:33 EDT Article-I.D.: ndmce.299 Posted: Fri Oct 17 16:59:33 1986 Date-Received: Tue, 21-Oct-86 05:38:52 EDT References: <89@houligan.UUCP> Sender: news@ndmce.uucp Reply-To: barnettb@steinmetz.UUCP (Barnett Bruce G) Organization: General Electric CRD, Schenectady, NY Lines: 51 In article <89@houligan.UUCP> dave@murphy.UUCP writes: >I would like to see a couple of things in vi that would make it a little less >frustrating to use in certain applications. They are: Try putting in .exrc :map! a A :map! b B :map! c C . . . :!map! z Z Anytime you type (in insert mode) an `a', the editor with map it into `A' What's that you say? You don't want this all the time? just put it in a file calls `.f' - for fortran, and type :source .f when you want fortran mode. Of course, you can define a function key to :source this Along with this, This is my .exrc file, which I customized for a vt100 terminal. It is set up for C and nroff -me macros (usually) set ai redraw sm wm=1 set tabstop=4 set shiftwidth=4 map! {} {^M}^[O^V /great for auto indenting { } pairs. map! ^[OD ^[ha /* cursor down while inserting */ map! ^[OA ^[ka /* vt100 up arrow while inserting */ map! ^[OB ^[ja /* cursow left while inserting */ map! ^[OC ^[la /* cursor right */ map ^[OP A /* mapped pf1 to append to end of line */ map! ^[OP ^[A /* insert mode of the above */ map ^[OQ 0i /* mapped pf2 to insert before line */ map! ^[OQ ^[0i /* insert mode of the above */ map! `` \*(lq /* troff left quote */ map! '' \*(rq /* troff right quote */ I can use the cursor keys while inserting. This is handy because I can backup and insert without hitting escape. Also, I have defined pf1 to append at the end of the line. This is useful because it doesn't matter what mode you are in, it always puts you in insert mode. At one time, I mapped the entire numeric keypad to emulate EDT. bruce barnett chinet!steinmetz!vdsvax!barnettb