Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode
or read-only
.
I know how to open a file as read only if emacs/vi/vim is already running.
command lineemacslinuxvim
Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode
or read-only
.
I know how to open a file as read only if emacs/vi/vim is already running.
Best Answer
For emacs:
There's no startup option to force read only.
Edit:
If you put this small function in your shell startup script (.bashrc for example) you can open a file read-only by typing
ev file_to_view