I am scripting a diff program between two longs paths and want one file to be read-only and the other to be read-write. e.g. I want to run something like
srcdiff test.c and my script will expand that to
vimdiff test.c /long/path/to/other/test.c I would like
/long/path/to/other/test.c to be read-only and
test.c to be read-write. I can accomplish this by doing
:set ro however I would have to do this every time I open a file. I tried
vimdiff test.c -R /long/path/to/other/test.c but that opened both files as read-only. Is it possible to accomplish this?
I am using version
VIM - Vi IMproved 6.2 (2003 Jun 1, compiled Sep 16 2003 11:00:10) on EL3 so updates are not exactly possible.