Occasionally I absentmindedly type :w
when I'm reading something. This causes the modification time of the file to change and sometimes causes my build system to unnecessarily rebuild a substantial chunk of a project.
Is there a way to set vim to simply not do anything if I try to write a file and it hasn't been changed?