加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

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

发布时间:2020-12-15 16:54:33 所属栏目:安全 来源:网络整理
导读:我使用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
我使用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…

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读