Skip to content

Instantly share code, notes, and snippets.

@johnkary
Created November 10, 2012 19:47
Show Gist options
  • Save johnkary/4052259 to your computer and use it in GitHub Desktop.
Save johnkary/4052259 to your computer and use it in GitHub Desktop.
Simple code highlighting for presentations
highlightkeynote() { highlight --font=Monaco --font-size=24 --style=johnkary -i "$@" -O rtf ;}

The --style=johnkary option is a custom color scheme I've created. You can see all the color schemes that ship with highlight by doing:

ls `brew --prefix highlight`/share/highlight/themes

Copy one of the themes and make your own modifications.

~/code $ ls src
total 80
drwxr-xr-x 9 johnkary staff 306 Nov 7 01:05 .
drwxr-xr-x 13 johnkary staff 442 Nov 6 14:57 ..
-rw-r--r-- 1 johnkary staff 757 Oct 27 23:51 TestingController.php
# Copy to clipboard for pasting into Keynote
~/code $ highlight TestingController.php | pbcopy
# Dump to RTF document
~/code $ highlight TestingController.php > TestingController.php.rtf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment