diff – 在我将文件保存到Vim之前,我可以看到更改吗?

前端之家收集整理的这篇文章主要介绍了diff – 在我将文件保存到Vim之前,我可以看到更改吗?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用Vim。
我打开一个文件。我编辑它,我想看看我编辑之前我保存它。

我如何在Vim中这样做?

http://vim.wikia.com/wiki/Diff_current_buffer_and_the_original_file

Here is a function and command to see a diff between the currently edited file and its unmodified version in the filesystem. Just put this in your vimrc or in the plugin directory,open a file,make some modifications without saving them,and do :DiffSaved.

06000

To get out of diff view you can use the :diffoff command.

Below is a similar function,adapted to mimic the 'cvs diff' command…

猜你在找的Bash相关文章