例如,如果abc是版本控制下的文件,那么我可以使用以下内容在一侧显示abc的当前版本,在另一端显示最新版本:
tkdiff abc
我也可以这样做:
tkdiff -r1 -r5 abc
tkdiff -r1 abc
查看当前版本和版本1之间的区别.
这是我想在文件的两个版本之间看到的差异,只使用Vim.可以吗?我在Linux下工作,我使用Bitkeeper进行版本控制.
解决方法
从描述:
VIM 7 plugin useful for manipulating files controlled by CVS,SVN,SVK and git within VIM,including committing changes and performing diffs using the vimdiff system.
特别是:VCSVimDiff将拆分当前窗口,并在repo中显示最新版本的“vimdiff”.您还可以指定一个修订版号来比较当前缓冲区(即:VCSVimDiff -2),或两个修订版号以相互区分.以下是文档中的相关部分:
:VCSVimDiff
Uses vimdiff to display differences between versions of the current
file.If no revision is specified,the most recent version of the file on
the current branch is used. With one argument,that argument is used
as the revision as above. With two arguments,the differences between
the two revisions is displayed using vimdiff.With either zero or one argument,the original buffer is used to perform
the vimdiff. When the scratch buffer is closed,the original buffer
will be returned to normal mode.Once vimdiff mode is started using the above methods,additional vimdiff
buffers may be added by passing a single version argument to the
command. There may be up to 4 vimdiff buffers total.Using the 2-argument form of the command resets the vimdiff to only those 2 versions. Additionally,invoking the command on a different file will close the prevIoUs vimdiff buffers.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。