For reasons unknown to me Safari does not let you choose what application you would like to view the HTML source in. As a web developer I find this frustrating. There are some plugins out there—like SafariStand—that adds syntax highlighting. However it doesn’t let me view the source in TextMate, my editor of choice.
The best solution I’ve found so far is an applescript that saves the source to a file and opens that file in TextMate. I don’t remember where I found this script, but I did not write it, nor trying to take any credit for it.
View HTTP Headers in Safari
Since Safari doesn’t let you view HTTP headers either—I modified the applescript to grab both headers and source and open it in TextMate.
View Source In TextMate (16KB) — 16 Mar 2008
View Source in TextMate with Headers (12KB) — 16 Mar 2008
Update: With the release of Safari 3.1 you can now use the Web Inspector to see HTTP headers. Cool.