Re: Text editting
"his file suddenly becoming encrypted"
That sounds more like vim than Real Vi.
My first encounter with vim was trying to do something that I'd done many times with vi - clean up a file from the DOS world. And the thing was pre-configured with some set command to hide them. I quickly came to the conclusion that if it could do that it might hide other things I might need to see.
lrwxrwxrwx 1 root root 12 Jul 11 2013 /etc/alternatives/vi -> /usr/bin/nvi