As suggested in the comments, this functionality is built-in to Vim, with the :diffthis, :diffsplit, :diffoff, etc. commands