home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / editors / 3023 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.2 KB  |  58 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!iat.holonet.net!dattier
  3. From: dattier@orac.holonet.net (DWT)
  4. Subject: Re: periodic saves
  5. Message-ID: <Bz5v3r.D3I@iat.holonet.net>
  6. Sender: usenet@iat.holonet.net (USENET News System)
  7. Nntp-Posting-Host: holonet.holonet.net
  8. Organization: Information Access Technologies, Inc. of Berkeley, CA
  9. References: <1992Dec9.182912.5853@telesciences.com>
  10. Date: Sat, 12 Dec 1992 19:21:26 GMT
  11. Lines: 45
  12.  
  13. In article <1992Dec9.182912.5853@telesciences.com> ciacovel@telesciences.com
  14. (Chris D Iacovelli) wrote:
  15.  
  16. I> While reading this thread, I was testing the possibility of:
  17.  
  18. I> :map! ^V^V  ^V^V ^V<Esc>:w!^V^Ma
  19.  
  20. I> However, I noticed that when I try do do anything from the command prompt
  21. I> that involves spaces, the above macro is executed.
  22.  
  23. I> Therefore, it seems that in the command mode, vi acts as if the command
  24. I> line is in insert mode.
  25.  
  26. I> Is this the case or am I missing something?
  27.  
  28. Yes, that's how it works and that is part of the problem I posted.  At a
  29. colon escape, all map!pings for insert mode are in effect.  If you map
  30. <space>, you have to ^V every space you type at the colon prompt.
  31.  
  32. Since I type two spaces between sentences, I map!ped <space><space> as
  33. follows (^V represents a hard ctrl-V stored with two presses of ctrl-V,
  34. likewise ^M is a stored ^M entered with ctrl-Vctrl-M) in my .exrc:
  35.  
  36. :map! ^V ^V  ^V ^[:w!^Ma [with a trailing space]
  37.            ^^ two spaces between the second and third ^V's
  38.  
  39. It's very rare to have two adjacent spaces in a colon escape.  For those
  40. infrequent occasions, I don't mind ctrl-V'ing one of them.
  41.  
  42. Between that map!ping and this one --
  43.  
  44. :map! ^M^M ^M^[:w!^Mi^M
  45.  
  46. I get a lot of checkpointing.  I also have autowrite set on and
  47. :map @@ :w!^M
  48. for command mode.
  49.  
  50. [The need to end the map!ping of ^M^M with i^M instead of o comes from what
  51.  happens when I break an existing paragraph by adding text inside it.]
  52.  
  53. What I really need is an editor that preserves and recovers properly; no,
  54. what I really need is a better connection to ddsw1.  Illinois Bell eats.
  55.  
  56. David W. Tamkin   P. O. Box 59297   Northtown Station, Illinois  60659-0297
  57. dattier@{holonet.net|ddsw1.mcs.com}   CIS: 73720,1570    MCI Mail: 426-1818
  58.