If you are formatting code samples for your Google Docs document, there is an odd little tool that you might find quite helpful.
It turns out that there are two tools available: “Code Pretty,” and “Online syntax highlighter like TextMate.”
OPTION # 1: Online syntax highlighter like TextMate
There is an odd little tool called: “Online syntax highlighter like TextMate.” At first glance, this page might appear incomplete, if not broken. It is interestingly un-styled and bare-bones. But here is the thing: this tool is actually pretty awesome. Just paste your code snippet in, choose from one of the many supported languages, then click the “Highlight” button. You wind up with two things: raw HTML and formatted text. The HTML is perfect if you need markup. Copy and paste this formatted text into a Google Docs document. The final impressive feature is the “Style” drop-down. There are about 20 different themes to choose from. For example, an example of formatted code generated with the Online syntax highlighter like TextMate tool is to the left.
Link for Online syntax highlighter like TextMate: http://markup.su/highlighter/
OPTION # 2: Code Pretty
Code Pretty is not bad. After a super-easy Chrome install, I was fortunately able to format code blocks quickly and easily. There are however, clearly some drawbacks to Code Pretty.
Unfortunately, the only formatting option is font-size. Also after a while, Code Pretty generated repeated messages saying that too many calls were being made to the service
Ultimately, Code Pretty simply stopped working. After a while it was functional again, but there is no pattern to the issue. Therefore this is not a recommended application.
Installation Link for Code Pretty: https://chrome.google.com/webstore/detail/code-pretty/igjbncgfgnfpbnifnnlcmjfbnidkndnh?hl=en
“Code Pretty” is good, but has issues and a limited feature-set. On the whole, “Online syntax highlighter like TextMate” is an oddly-named, yet super-useful tool that is otherwise perfect for use with Google Docs documents.