Take diff of two vertical opened windows in Vim

后端 未结 4 881
醉话见心
醉话见心 2020-12-22 18:54

I\'ve have two files opened. They are opened in vertical mode, next to next. Can I instantly diff these two files without leaving or closing Vim ?

4条回答
  •  没有蜡笔的小新
    2020-12-22 19:13

    Following up on the earlier answers,

    • :windo difft (short for diffthis) will start diff mode in all the open windows.
    • :windo diffo (short for diffoff) will stop diff mode in all the open windows.

    I have the following mappings in my vimrc to make it easier:

    command! Difft windo diffthis
    command! Diffo windo diffoff
    

提交回复
热议问题