The OS on my first computer was Windows 3.1, and I lived with Windows 95/98/ME for a long time. When you live their formative years in this kind of environment, you develop an obsessive need to save your work all the time, because at any moment, the program you were using could crash. With Vim, a save is just a
:w away. I hit that combination so often it's a wonder I haven't worn a hole through my w key yet. It takes no effort or thinking at this point, just a quick reflex flick of the wrist.
Did you ever wonder just how often you save your work in a given day? I wondered, so I put this into ~/.vimrc:
cabbrev w <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'W' : 'w')<CR> command! -nargs=* W :execute("silent !echo " . strftime("%Y-%m-%d %H:%M:%S") . " >> ~/timestamps")|w <args>
Now every time I do
:w, it will append a timestamp to a text file. It's not quite perfect and :w won't work right in certain cases but it was good enough for a quick hack.
I let Vim go like this for one whole day at work. I got in a good six and a half hours of coding on Tuesday (keeping in mind that I was using other programs all day too, messing with our DB, running and debugging the script I was writing, responding to emails, and so on).
It turns out I hit :w 356 times that day. Here's a chart of saves per hour.
Clearly either my productivity or my data-loss paranoia increases as the day progresses. I think I got up to make a cup of tea at around 2:00 so that may explain the fall-off. And the last hour isn't quite a full hour of work because I went home.
So as a rough estimate, it looks like I save my work about once per minute. Looking at the data, it's not at all uncommon for me to have saved my work twice within a 5-second period of time. There are even a few cases where I saved twice within two seconds.