See the man page for
vi
view Start in read-only mode. You will be protected from writing the files. Can also be done with the "-R" argument.
-R Read-only mode. The 'readonly' option will be set. You can still edit the buffer, but will be prevented from accidently overwriting a file. If you do want to overwrite a file, add an exclamation mark to the Ex command, as in ":w!". The 'readonly' option can be reset with ":set noro". See ":help 'readonly'".