Open a file in a tab in vim in readonly mode

To open a file in read only mode in a new tab, use

tab sview /path/to/file

To open the file in the same pane, (without using a new window or tab), use

view /path/to/file

Note that tab view /path/to/file does not open a new tab.


You can open a file in readonly mode from inside vim:

:view /path/to/file

or from command line:

$ vim -M /path/to/file