Alex Rivera | Logout

Diff two tabs in Vim

Asked 2009-07-08T01:34:57.333
124

Scenario: I have opened Vim and pasted some text. I open a second tab with :tabe and paste some other text in there.

Goal: I would like a third tab with a output equivalent to writing both texts to files and opening them with vimdiff.

The closest I can find is "diff the current buffer against a file", but not diffing two open but unsaved buffers.

Edit
Report

1 Answer

27

When you have two files opened in vertical splitt, run

:windo diffthis

answered 2013-05-24T20:08:12.223

Your Answer