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

teerapap picture teerapap · Apr 14, 2009 · Viewed 37.3k times · Source

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?

Answer

chaos picture chaos · Apr 14, 2009
:w !diff % -