如何使用Vim快速查看Mercurial或Git的变化 [英] How to use Vim to quickly see Mercurial or Git changes

查看:203
本文介绍了如何使用Vim快速查看Mercurial或Git的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Vim中编辑一个文件时,我想快速地突出显示自从我上次提交以来所做的任何更改,同时仍然能够编辑该文件。有没有什么事情可以做到这一点? 试试 vcscommand 插件,使用:VCSVimDiff 查看当前版本的差异(同时支持hg和git,可能还有其他一些SCM系统)以及内部的:bdelete :bd )当然,不是已经存在的)停止差异。如果您使用的是gentoo,它可以在存储库中找到: app-vim / vcscommand


As I'm editing a file in Vim, I would like to quickly highlight any changes I have made since my last commit, while still being able to edit the file. Is there anything that comes close to doing this?

解决方案

Try vcscommand plugin, use :VCSVimDiff to view differencies with current revision (supports both hg and git, probably some other SCM systems as well) and internal :bdelete (:bd) (on opened buffer of course, not on already existing) to stop diffing. If you are using gentoo, it is available in the repository: app-vim/vcscommand.

这篇关于如何使用Vim快速查看Mercurial或Git的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆