I always thought that Safari’s source view was pretty dull and uninteresting and that they could have done better with it. Well, last night I finally decided to do something about it. After spending a couple hours looking over the disassembly of parts of Safari (to figure out where best to patch it) and then spending many more hours actually writing an HTML syntax colorizer I have a working SIMBL plugin that adds syntax coloring to Safari’s source view. I think it works quite well, although I admit I should add a preference pane to control the colors (it’s harder than you’d think to add a preference pane to Safari, which is why I don’t have it done for this release). If you want to download SafariSource (my plugin), you can get it here.
If you don’t like the existing colors you can always change them with a few terminal commands. Simply go in the terminal and use the following commands:
defaults write com.apple.Safari SafariSourceTagColor -array red green blue defaults write com.apple.Safari SafariSourceAttributeColor -array red green blue defaults write com.apple.Safari SafariSourceStringColor -array red green blue defaults write com.apple.Safari SafariSourceEntityColor -array red green blue defaults write com.apple.Safari SafariSourceIgnoreColor -array red green blue defaults write com.apple.Safari SafariSourceDocTypeColor -array red green blue defaults write com.apple.Safari SafariSourceProcessingInstructionColor -array red green blue
Most of those should be obvious what they affect. The SafariSourceIgnoreColor one affects the color used for the contents of <style> and <source> tags.
Anyway, if you have any feedback on SafariSource, feel free to send it to me.
Entries (RSS)