使用vim-fugitive的当前版本和先前版本的差异 [英] Diff of current and previous version using vim-fugitive
问题描述
我知道:Glog
会将当前缓冲区中文件的所有版本填充到快速修复列表中,我可以在这些文件上按<enter>
来查看该特定版本的文件,但是有一种简单的方法可以看到特定版本与先前版本的差异(以便轻松查看已更改的内容)?
I know that :Glog
will populate the quickfix list with all the versions of the file in the current buffer and that I can hit <enter>
on these to see the file at that particular version, but is there an easy way to see the diff of a particular version with the previous version (to easily see what has changed)?
我所看到的是在vim的垂直差异中看到这些变化:git log -p -- path/to/file.txt
.
What I'm after is seeing each of these changes in a vertical diff in vim: git log -p -- path/to/file.txt
.
推荐答案
无法逃避做我想做的事情(要么不做,要么不知道如何使用),但我确实找到了提供所需行为的插件: https://github.com/kablamo/vim-git-log .
Could not get fugitive to do what I want (it either doesn't do it or I don't know how to use it), but I did find the plugin which gives the desired behaviour: https://github.com/kablamo/vim-git-log.
(它不会在quickfix列表中显示差异,而是在完整大小的缓冲区中显示,可以)
(it does not show the diff in quickfix list but in a full sized buffer, which is OK)
这篇关于使用vim-fugitive的当前版本和先前版本的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!