When my professor (a stalwart emacs user) opened vim by mistake during class, he asked, “how do I save and quit?” I thought for sure a student was trolling him by telling to “ZZ”. Today, I remembered this and actually looked it up.
When writing the buffer, the default is to use the current file name. Thus
when you give the “ZZ” or “:wq” command, the original file will be
overwritten. If you do not want this, the buffer can be written into another
file by giving a file name argument to the “:write” command. For example:vim testfile [change the buffer with editor commands] :w newfile :q
So much for trolling.