16

So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command:

:diffg RE

I get the error:

E93: More than one match for RE

Not sure where this is coming from or how to solve it. I was pretty surprised that stack overflow doesn't seem to have this problem posted anywhere. Thanks in advance to anyone who can help :)

Joshua Vandenbor
  • 509
  • 3
  • 6
  • 19

1 Answers1

19

There's probably one of the file paths that match the string "RE". Try :diffget REMOTE and it should be okay.

Adam
  • 4,180
  • 2
  • 27
  • 31
  • If it really checks the file paths, that seems like a bug? because it's which ref we want. If someone had remote in the file path. what would you do? – christopher clark Jun 30 '21 at 14:45
  • 1
    @christopherclark I didn't actually know, my answer was a hunch so I've dug deeper. See `:help diffget` in vim. The `diffget` command expects a `bufspec` which is either a numbered buffer (from `:ls`) or it will attempt to fuzzy match a unique path from available buffers. In the case you raise (and all others) you need to specify a `buffspec` that uniquely identifies a buffer. Note that `REMOTE` isn't a vim thing, git names a temporary file this way when setting up a three way merge with `git merge-tool`. – Adam Jul 01 '21 at 13:50