Gary Johnson wrote:
[...]
I've also come up with a solution for part of the problem, that of Vim's insistence on converting a name like

    /project/xyz/system/src/bar.c@@/main/42

(through chdir() and getcwd()) to a name like

    /view/garyjohn_main@@/project/xyz/system/main/5/src/main/2/bar.c/main

Using the following autocommand seems to fix that by restoring the original file name. I thought I had tried this solution before and it didn't work, but it seems to work now, so I must have had something set differently before.

    au VimEnter /view/*@@/* silent windo
        \ exe 'file' system('cleartool des -short -cview "'.expand("%").'"')

The windo command covers the case where vim was invoked as vimdiff to compare two ClearCase versions.

Thanks again,
Gary


VimEnter doesn't cover the case when you ":edit" or ":view" (etc.) the file after starting Vim. Maybe:

  :au BufReadPost /view/*@@/* silent exe 'file' system(...etc...)



Best regards,
Tony.

Reply via email to