开发者

How do I open a .diff file on a mac?

I have a .diff file but I don't know how to open it. I trie using FileMerge but t开发者_Python百科hat doesn't give me an option to open a .diff file.

Any ideas? Thanks.


Diffs are just plain text. You should be able to open it with TextEdit or any other text editor. If you want syntax highlighting probably many of the fancier editors could do that. I just used Aquamacs Emacs to load a diff file and it provided some highlighting.

And if you want to ‘apply’ the diff to a file, use the patch command, like in SanHolo's answer.


Use patch from the command line, like you would on a Linux box.

patch original_file.c diff_file.diff

Edit:
I'm assuming that with "open" you mean to apply the diff file to the original. If you just want to take a look at the file, see Chris' answer.


Vim offers coloration for diff files. If you'd rather go graphical, use MacVim (which is free) or TextMate (not free).

TextMate

How do I open a .diff file on a mac?

MacVim

How do I open a .diff file on a mac?

Vim

How do I open a .diff file on a mac?


Kompare opens .diff in convenient view

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜