home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / editors / 2706 < prev    next >
Encoding:
Text File  |  1992-11-10  |  891 b   |  30 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!mcsun!sun4nl!sci.kun.nl!cs.kun.nl!hansm
  3. From: hansm@cs.kun.nl (Hans Mulder)
  4. Subject: Re: help in vi
  5. Message-ID: <BxI052.Esv@sci.kun.nl>
  6. Sender: news@sci.kun.nl (NUnet News Owner)
  7. Organization: University of Nijmegen, The Netherlands
  8. References: <1992Nov10.070239.16698@dragon.acadiau.ca>
  9. Date: Tue, 10 Nov 1992 11:34:13 GMT
  10. Lines: 18
  11.  
  12. In <1992Nov10.070239.16698@dragon.acadiau.ca> 911288c@dragon.acadiau.ca (EDwin Chung) writes:
  13.  
  14. >    how would i map a key to make :wq to save a copy of
  15. >    the ordinary file and save a new one ??
  16.  
  17. Create a file named .exrc in your home directory with the text
  18.  
  19. map K :write! %.bak^M
  20.  
  21. (The ^M should a control-M.  Type control-V control-M to produce it.)
  22.  
  23. Then typing a K in command mode will save a backup copy of the buffer
  24. in a file named current-file-name.bak .
  25.  
  26. --
  27. Hope this helps,
  28.  
  29. Hans Mulder            hansm@cs.kun.nl
  30.