Loading ...
Sorry, an error occurred while loading the content.

125119Re: swap files reverting my work erroneously

Expand Messages
  • ZyX
    Aug 2, 2011
      Reply to message «Re: swap files reverting my work erroneously»,
      sent 19:05:34 02 August 2011, Tuesday
      by Gary Johnson:

      > I started using Unix and vi in 1985 in an environment where people
      > would inadvertently unplug serial cables or coaxial LAN cables, and
      > where occasional lightning strikes and careless backhoe operators
      > would take out our power. I got in the habit of saving my work
      > regularly.
      >
      > But now we have more reliable systems, and UPSs, and Vim with
      > automatic backups. My habits have changed. Now I save a file when
      > I'm done with a set of changes to it, not reflexively.
      I started using vim and linux only a few years ago and did not do any serious
      work before that needed reflexive savings. The reason why I do them is that I
      decided that it is a good habit because
      1. if it is a habit you don't need to think and thus loose exactly no time to do
      a save (I already paused typing; I don't do it just because I typed too much);
      2. software contains bugs. I observed unreproducible X crashes several times and
      thus I need to know that I won't loose my work if something like this happens. I
      have an UPS but it won't help here. You can say that systems are more reliable
      this time, but I never did real work on less reliable systems, so for me these
      few crashes are already too much. The only thing that will make me think that
      some system is reliable is a mathematically correct proof of this. You can't
      write it for C code and for this very bold GNU C Compiler, can you?

      Original message:
      > On 2011-08-02, Tony Mechelynck wrote:
      > > On 2011-08-02, Gary Johnson wrote:
      > >> On 02/08/11 06:38, ZyX wrote:
      > > >>>I have swap files to prevent myself from editing one file in two vim
      > > >>>instances simultaneously. Though sometimes something goes wrong and
      > > >>>vim or the whole system crashes, but I never needed them to recover
      > > >>>anything. All you need to have the same behavior is to train yourself
      > > >>>to do «paused for thinking - hit {lhs of your mapping to :up} to save
      > > >>>file». For me it happens even more times then «stopped inserting -
      > > >>>exit insert mode».
      > > >>
      > > >>That's another good reason to use swap files. The trouble with
      > > >>continually saving, though, is that you lose your reference for the
      > > >>changes you've made to the file since you started editing. That's
      > > >>not always important, but sometimes it's very handy. And having
      > > >>swap files means I can do that without worry.
      > > >>
      > > >>Regards,
      > > >>Gary
      > >
      > > If you need a snapshot of a certain state of the disk file, take a copy.
      > > If you need successive snapshots, use numbered or dated backups, Vim
      > > supports them, after a fashion: see ":help backupext".
      >
      > Yes, I _can_ do that, and I do that on occasion, but I don't
      > _have_ to do that to have a reliable copy of the original state of
      > the file and of my changes. Not doing that, I don't have to deal
      > with the clutter of backup copies that need to be deleted at some
      > point. For long-term backup and history retention, I use a VCS.
      >
      > > I'm sure I'm not the only one on these lists who started editing at a
      > > time (and with an editor) where such luxuries as automatically recorded
      > > swapfiles simply didn't exist: for us old-timers, it has become a reflex
      > > to save the files whenever we stop editing (even if it's just to take a
      > > leak), and at least once every quarter-hour.
      >
      > I started using Unix and vi in 1985 in an environment where people
      > would inadvertently unplug serial cables or coaxial LAN cables, and
      > where occasional lightning strikes and careless backhoe operators
      > would take out our power. I got in the habit of saving my work
      > regularly.
      >
      > But now we have more reliable systems, and UPSs, and Vim with
      > automatic backups. My habits have changed. Now I save a file when
      > I'm done with a set of changes to it, not reflexively.
      >
      > Regards,
      > Gary
    • Show all 25 messages in this topic