How do I open a file in read-only mode?
You can open a file in read-only mode using the “:view” command:
:view
This command sets the ‘readonly’ option for the opened buffer. You can also use the “-R” command-line option to open a file in read-only mode:
$ vim -R
You can also use the symbolic link executable “view” to open a file in read-only mode from the command-line:
$ view
Comments (1)
Pepsh Pepshinsky
Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE