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.
|
Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in I know how to open a file as read only if emacs/vi/vim is already running.
| |||
|
feedback
|
|
For emacs:
There's no startup option to force read only. Edit:
| ||||
|
feedback
|
|
vim -R filename | |||
|
feedback
|
|
view filename Basically vim in read-only mode; simples! | |||||||||
feedback
|
allows writing with
Prevents the user from making any changes to the file in the buffer. But the user could make the buffer modifiable with You could use
to prevent the user from turning off the "nomodifiable", and allow the user to quit by pressing You could also open the file with the less command:
To view the file in a vim-like environment but without the ability to change the file. | ||||
|
feedback
|
|
sending a file to std out, may be acceptable given the size of the file
| |||
|
feedback
|