Eric Guo's blog.cloud-mes.com

in HTML5, JavaScript, Ruby & Rails, Python, and Cloud MES!

Presenting Code With Syntax-highlight in Keynote Using Command Tool Highlight

Permalink

Just one line

pbpaste | highlight --syntax=rb -O rtf | pbcopy
pbpaste | highlight --syntax=html -O rtf | pbcopy
pbpaste | highlight --syntax=scss -O rtf | pbcopy
pbpaste | highlight --syntax=jsx -O rtf | pbcopy
pbpaste | python -m json.tool | highlight --syntax=json -O rtf | pbcopy

Click to see more language highlight supported.

Note: install highlight first using brew install highlight, original link

Comments