🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #2636

VI Macros, Or What Is Really Going On Here?

#2636
From: Chris D Iacovelli
Date: Wed, 30 Dec 1992 18:27
47 lines
1761 bytes
Dear VI users,

I have one macro which centers text lines,
 i.e.
map [c :s/^[ ^I]*//^M$maKV{{\q
          ||       ||
          ||       A ^V'ed ^M
          ||
          Not a ^V'ed ESC

I have another macro to stop formatting comments a la c-style,
i.e.
map! */ ^[:so ~/.CCOM.OFF^["ap$s/ ^[A
        ||               ||       ||
        ||               ||       ||
        ||               ||       ||
        ==============|=============
                ^V'ed ESC's


The above macros work fine if they are in seperate .exrc files.
However, when they are incorporated into the same .exrc file they don't
work,
 i.e. when I execute the [c macro the */ macro is called and I get an
      ":input read error".

I believe that the */ of the search string in the [c macro is being
replaced with the contents of the */ map.

Does this mean that during command mode that VI actually is in single
line insert mode, insert into a command line buffer? or am I doing
something wrong in my macro defines?

Any insight would be greatly appreciated.

Please post or email to the address below.

Thanks
Chris.

   =========================================================================

                           ciacovel@telesciences.com

   Zl pbzcnal cnlf zr gb guvax, ohg gurl ner abg erfcbafvoyr sbe zl gubhtugf

   =========================================================================
Technical Details
Message-ID: <1992Dec30.182744.9053@telesciences.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!telesci!ciacovel

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!telesci!ciacovel
From: ciacovel@telesciences.com (Chris D Iacovelli)
Subject: VI Macros, Or What Is Really Going On Here?
Message-ID: <1992Dec30.182744.9053@telesciences.com>
Organization: TeleSciences CO Systems, Inc.
Date: Wed, 30 Dec 1992 18:27:44 GMT
Lines: 47