Re: vi...
My usual strategy with vi was to hit the 'esc' key if I couldn't remember what state I had left an edit in or if I had hit a number of keys before noticing that I wasn't in insert mode. The best vi error came about when I set up up linux box at work to provide a DNS server for our team to access some customer IPs that had changed.
After a weeks holiday, I came back to find it not working. A collegue had 'just edited the hosts file with some new entries' and the system hung when booting. After booting with a CD and mounting the system disk, it turned out that the host file was about 2M in size. It contained several hundred copies of the original. When inetd tried to load, it read the hosts file and fell over with lack of memory (it was quite an old version of Mandrake). Rather than use the usual ':wq' to exit, my collegue had used some fancy set of control keys which, although they wrote the file out and quit, also managed to replicate the entire buffer several hundred times.
vi became a lot easier to use with the easy cut and paste in PuTTY. I admit to the crime of copying the buffer, pasting it into Windows Notepad, editing and pasting the result back.
Phil.