I'm trying to diff two files using gvimdiff file1 file2
. This works in certain parts of my file system, but if I'm several directories deep, it stops working. Instead, it'll open three files and one of the diffed files will be in a nonexistent nested duplicate directory---you'll see what I mean below.
For example, say I want to open a file in the directory c:\a\b\c\d\e\
.
- I navigate to that directory containing file1 and file2.
- Just to check, dir shows the contents of the directory and file1 and file2 are both present as expected.
- I run the command
gvimdiff file1 file2
. - Three files are opened, shown below.
1. c:\a\b\c\d\e\file1 (correct file in diff mode)
2. c:\a\b\c\d\e\c\d\e\file2 (non existent, blank, correctly named in diff mode)
|_____|_____|--- Notice the duplicated part of the filepath!
3. c:\a\b\c\d\e\file2 (correct file, not in diff mode, not current buffer)
If I try the exact same procedure, but I'm in c:\users\my_name\
, then everything works as expected. For now, I've gotten things to work by using
gvimdiff file1 ..\..\..\file2
and if I go one folder deeper or shallower, I have to add or remove a ..\
to compensate.
What is going on here and how might I fix it?
cd \a\b\c\d\e
thendir
thengvimdiff file1 file2
and file2 is not found but with the series of..`s it works, etc. Can you also see what
:pwd` is inside Vim and what:file
reports for each file? Please edit the question with the additional information.