Can I see changes before I save my file in Vim?

前端 未结 14 1817
刺人心
刺人心 2020-12-07 07:33

I use Vim. I open a file. I edit it and I want to see what I\'ve edited before I save it.

How can I do this in Vim?

14条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-07 08:01

    Follow the above suggests I use git diff that I like much:

    :w !git diff  % -
    

提交回复
热议问题