Article View: comp.editors
Article #2497Re: periodic saves
From: DWT
Date: Sat, 12 Dec 1992 19:21
Date: Sat, 12 Dec 1992 19:21
45 lines
2318 bytes
2318 bytes
In article <1992Dec9.182912.5853@telesciences.com> ciacovel@telesciences.com
(Chris D Iacovelli) wrote:
I> While reading this thread, I was testing the possibility of:
I> :map! ^V^V ^V^V ^V<Esc>:w!^V^Ma
I> However, I noticed that when I try do do anything from the command prompt
I> that involves spaces, the above macro is executed.
I> Therefore, it seems that in the command mode, vi acts as if the command
I> line is in insert mode.
I> Is this the case or am I missing something?
Yes, that's how it works and that is part of the problem I posted. At a
colon escape, all map!pings for insert mode are in effect. If you map
<space>, you have to ^V every space you type at the colon prompt.
Since I type two spaces between sentences, I map!ped <space><space> as
follows (^V represents a hard ctrl-V stored with two presses of ctrl-V,
likewise ^M is a stored ^M entered with ctrl-Vctrl-M) in my .exrc:
:map! ^V ^V ^V ^[:w!^Ma [with a trailing space]
^^ two spaces between the second and third ^V's
It's very rare to have two adjacent spaces in a colon escape. For those
infrequent occasions, I don't mind ctrl-V'ing one of them.
Between that map!ping and this one --
:map! ^M^M ^M^[:w!^Mi^M
I get a lot of checkpointing. I also have autowrite set on and
:map @@ :w!^M
for command mode.
[The need to end the map!ping of ^M^M with i^M instead of o comes from what
happens when I break an existing paragraph by adding text inside it.]
What I really need is an editor that preserves and recovers properly; no,
what I really need is a better connection to ddsw1. Illinois Bell eats.
David W. Tamkin P. O. Box 59297 Northtown Station, Illinois 60659-0297
dattier@{holonet.net|ddsw1.mcs.com} CIS: 73720,1570 MCI Mail: 426-1818
Technical Details
Message-ID:
<Bz5v3r.D3I@iat.holonet.net>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!iat.holonet.net!dattierReferences:
<1992Dec9.182912.5853@telesciences.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.editors Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!iat.holonet.net!dattier From: dattier@orac.holonet.net (DWT) Subject: Re: periodic saves Message-ID: <Bz5v3r.D3I@iat.holonet.net> Sender: usenet@iat.holonet.net (USENET News System) Nntp-Posting-Host: holonet.holonet.net Organization: Information Access Technologies, Inc. of Berkeley, CA References: <1992Dec9.182912.5853@telesciences.com> Date: Sat, 12 Dec 1992 19:21:26 GMT Lines: 45