I am trying to determine if a vim read-only instance can open a file, to detect changes.
I am developing a method of forging a minimap-style functionality in VIM running in Konsole (KDE terminal emulator). I am having trouble syncing the two views. My line of thinking is that I might use a marker, but I need the map view to have access to the main view’s markers. Is there a way to open an already-open file with the -R flag (readonly) but have it read the existing swap file to be notified of new markers?
Thanks!
I could not see a way to do this, and tried using a simple text file and two processes trying to edit the same file, with one Vim process invoked with -R.
Using gVim — never tried with command line vim — it is notified when a change takes place, but not because another vim process made the change. In other words, CVS might update a file I am editing, and I’m asked whether to ignore or reload, but two vim processes did not have that file open.
I did some more work with this, and using -R and 7.2.330 and I was able to edit one file regularly and the same file using vim -R. When I wrote out the file with a change, the other file did not see the change. gVim did see the change when made.