« Back to Index

Shell: Google Doc Code Syntax Highlighting

View original Gist on GitHub

Tags: #google #doc #code #syntax #brew #highlight

Google Doc Code Syntax.md

brew install highlight

Now copy some code to your clipboard, followed by running:

pbpaste | highlight --syntax=go -O rtf | pbcopy

Note: don’t ‘copy’ the above bash code, manually type it, otherwise you’ll end up trying to syntax highlight the line of bash! lulz on me for doing exactly that :facepalm:

Now paste your clipboard into your Google doc.