Xcode 提交窗口 -- 显示类似 unix-diff 的 diff (不显示整个文件)
谈论最新的 Mac OS X Lion (10.7.3) 上的最新 Xcode (4.2.1)。
当您按 option-command-C 时,Xcode 会弹出一个窗口,并排显示新文件和文件的旧版本 -边。
我喜欢优雅的界面;但是,有时它对于较长的文件并不理想。
问题是,Xcode 向您显示整个文件,因此为了查看所有更改,您基本上必须滚动整个文件。如果您只是进行了由几行组成的更改,这尤其令人烦恼 - 您仍然需要滚动整个文件以检查您是否意外地提交了其他内容。
有没有办法让 Xcode 表现得像 UNIX diff
,它只显示文件的更改部分(加上几行上下文)?
Talking about latest Xcode (4.2.1) on latest Mac OS X Lion (10.7.3).
When you press option-command-C, Xcode pulls up a window showing the new file and the old revision of the file side-by-side.
I like the elegance of the interface; however, sometimes it's not ideal for longer files.
The problem is, Xcode shows you the ENTIRE file, so in order to see all the changes, you basically have to scroll through the whole file. This is especially annoying if you just made a change consisting of a few lines -- you still have to scroll through the whole file to check you accidentally aren't commiting something else.
Is there a way to make Xcode behave like the UNIX diff
, which shows you ONLY the changed portions of the files (plus a few lines of context)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这并不完全是我想要的,但它仍然有帮助:
我发现您可以单击两个文件之间的区域,然后使用向上/向下箭头键直接在已更改的区域之间移动。
这大大简化了查看差异的过程。
This is not exactly what I was looking for, but it helps nevertheless:
I found out you can click on the region between the two files, and then use up/down arrow keys to directly move between regions which have changed.
This simplifies viewing the diffs greatly.