On 8/12/06, Gary Johnson <[EMAIL PROTECTED]> wrote:
I just finished troubleshooting a problem that had several
contributing factors, one of which was the way Vim's mch_FullName()
function behaves with ClearCase versioned file names.
If you open a file under ClearCase using the full path name and a
version extension, e.g.,
/project/xyz/system/src/bar.c@@/main/42
Vim will ask mch_FullName() for the full name of that file.
mch_FullName() will then extract everything to the left of the last
'/' as the directory containing the file and chdir() to that
directory, e.g.,
chdir("/project/xyz/system/src/bar.c@@/main")
mch_FullName() then calls getcwd() to determine the operating
system's name for that directory, which from ClearCase is
/view/garyjohn_main@@/project/xyz/system/main/5/src/main/2/bar.c/main
mch_FullName() then puts back the trailing "file name" of "42" in
this case and returns the full file name as
/view/garyjohn_main@@/project/xyz/system/main/5/src/main/2/bar.c/main/42
This is the name that is then given to the buffer used for that file
and which appears in the status line.
This is a valid file name which points to the correct file and works
with most external commands. However, it does not work with those
external commands or Vim autocommands whose behavior depend on the
file name suffix. It's also really ugly in the status line.
How about using a symlink ?
Regarding statusline, you can use custom statusline
and replace %f to %{MyFilename()} which knows to handle @@.
Yakov