TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Icdiff: Side-by-side highlighted command line diffs

112 点作者 stepstop将近 5 年前

13 条评论

jez将近 5 年前
Another little known diff power tool:<p><pre><code> vim -d old.txt new.txt </code></pre> This will open two files in diff mode. You can then use a whole host of fancy keybindings to edit the two files in a diff-aware way (&quot;apply this hunk to that file&quot; &#x2F; manually edit a file and then re-render the diff &#x2F; &quot;fold or expand all non-hunk text&quot; &#x2F; etc.). For more:<p><pre><code> :help diff </code></pre> or see here <a href="https:&#x2F;&#x2F;neovim.io&#x2F;doc&#x2F;user&#x2F;diff.html" rel="nofollow">https:&#x2F;&#x2F;neovim.io&#x2F;doc&#x2F;user&#x2F;diff.html</a>
评论 #23745483 未加载
评论 #23745744 未加载
bno1将近 5 年前
A similar tool that I really like is meld (<a href="https:&#x2F;&#x2F;meldmerge.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;meldmerge.org&#x2F;</a>). It has a GUI, really nice visual indicators, allows you to view the entire file and directory trees and you can jump between diff chunks using alt + arrow up&#x2F;down.<p>I often use it with git:<p>git difftool -t meld -d
评论 #23747094 未加载
NateEag将近 5 年前
Delta is a similar tool with syntax highlighting for most programming languages and customizable themes:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dandavison&#x2F;delta</a><p>It doesn&#x27;t have side-by-side diffs, but it&#x27;s still well worth having around.<p>It&#x27;s a Unix filter, so it works on any unified diff you can come up with.<p>Its default output isn&#x27;t a unified diff, but that&#x27;s easy to fix with its configuration &#x2F; CLI options (I&#x27;m too used to reading unified diffs to like delta&#x27;s simplified default format).
e12e将近 5 年前
This looks nice, but is it very different from gnu(?) diff --color=always --side-by-side?
评论 #23749564 未加载
mixmastamyk将近 5 年前
I&#x27;ve been using `alias diff=colordiff` for maybe twenty years. Looks like icdiff can highlight small changes without needing to call out the whole line. Is there anything else new this one brings?
评论 #23749537 未加载
fphilipe将近 5 年前
If you&#x27;re used to Git&#x27;s diff view and want to use it for any two files outside of a repo, you can do<p><pre><code> $ git diff --no-index file_a file_b</code></pre>
warkdarrior将近 5 年前
colordiff -y [<a href="https:&#x2F;&#x2F;www.colordiff.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.colordiff.org&#x2F;</a>] has similar functionality.
评论 #23745178 未加载
评论 #23749577 未加载
auraham将近 5 年前
This is a really useful utility. This post explains how to use it with mercurial for better diffs:<p><a href="https:&#x2F;&#x2F;ianobermiller.com&#x2F;blog&#x2F;2016&#x2F;07&#x2F;14&#x2F;side-by-side-diffs-for-mercurial-hg-icdiff-revisited&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ianobermiller.com&#x2F;blog&#x2F;2016&#x2F;07&#x2F;14&#x2F;side-by-side-diffs...</a>
pabs3将近 5 年前
I like diffoscope&#x27;s side-by-side HTML diffs of arbitrary files&#x2F;dirs, for eg:<p><a href="https:&#x2F;&#x2F;diffoscope.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;diffoscope.org&#x2F;</a> <a href="https:&#x2F;&#x2F;diffoscope.org&#x2F;examples&#x2F;https-everywhere-5.0.6_vs_5.0.7.html" rel="nofollow">https:&#x2F;&#x2F;diffoscope.org&#x2F;examples&#x2F;https-everywhere-5.0.6_vs_5....</a>
tutfbhuf将近 5 年前
I wish Icdiff had syntax highlighting for common programming languages.
评论 #23749612 未加载
评论 #23747112 未加载
yboris将近 5 年前
Related: <i>diff2html</i> CLI that will open your browser to a beautifully-rendered HTML diff:<p><a href="https:&#x2F;&#x2F;diff2html.xyz&#x2F;" rel="nofollow">https:&#x2F;&#x2F;diff2html.xyz&#x2F;</a>
zestyping将近 5 年前
ydiff might be the tool you&#x27;re looking for.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ymattw&#x2F;ydiff" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ymattw&#x2F;ydiff</a>
评论 #23749863 未加载
splittingTimes将近 5 年前
In your experience, What&#x27;s the best tool to check 3-way merge diffs under windows?
评论 #23745265 未加载
评论 #23747848 未加载
评论 #23747906 未加载
评论 #23745340 未加载
评论 #23745385 未加载
评论 #23746204 未加载
评论 #23745718 未加载
评论 #23747512 未加载