home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / editors / 3131 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.7 KB  |  57 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!psinntp!telesci!ciacovel
  3. From: ciacovel@telesciences.com (Chris D Iacovelli)
  4. Subject: VI Macros, Or What Is Really Going On Here?
  5. Message-ID: <1992Dec30.182744.9053@telesciences.com>
  6. Organization: TeleSciences CO Systems, Inc.
  7. Date: Wed, 30 Dec 1992 18:27:44 GMT
  8. Lines: 47
  9.  
  10. Dear VI users,
  11.  
  12. I have one macro which centers text lines,
  13.  i.e.
  14. map [c :s/^[ ^I]*//^M$maKV{{\q
  15.           ||       ||
  16.           ||       A ^V'ed ^M
  17.           ||
  18.           Not a ^V'ed ESC
  19.  
  20. I have another macro to stop formatting comments a la c-style,
  21. i.e.
  22. map! */ ^[:so ~/.CCOM.OFF^["ap$s/ ^[A
  23.         ||               ||       ||
  24.         ||               ||       ||
  25.         ||               ||       ||
  26.         ==============|=============
  27.                 ^V'ed ESC's
  28.  
  29.  
  30. The above macros work fine if they are in seperate .exrc files.
  31. However, when they are incorporated into the same .exrc file they don't
  32. work,
  33.  i.e. when I execute the [c macro the */ macro is called and I get an
  34.       ":input read error".
  35.  
  36. I believe that the */ of the search string in the [c macro is being
  37. replaced with the contents of the */ map.
  38.  
  39. Does this mean that during command mode that VI actually is in single
  40. line insert mode, insert into a command line buffer? or am I doing
  41. something wrong in my macro defines?
  42.  
  43. Any insight would be greatly appreciated.
  44.  
  45. Please post or email to the address below.
  46.  
  47. Thanks
  48. Chris.
  49.  
  50.    =========================================================================
  51.  
  52.                            ciacovel@telesciences.com
  53.  
  54.    Zl pbzcnal cnlf zr gb guvax, ohg gurl ner abg erfcbafvoyr sbe zl gubhtugf
  55.  
  56.    =========================================================================
  57.