Skip to content

Instantly share code, notes, and snippets.

@davegurnell
Created May 13, 2015 11:04
Show Gist options
  • Select an option

  • Save davegurnell/26d5964403639c3564ea to your computer and use it in GitHub Desktop.

Select an option

Save davegurnell/26d5964403639c3564ea to your computer and use it in GitHub Desktop.
Syntax highlighting for Keynote slides using Sublime Text and Highlight

Easy(ish) Syntax Highlighting in Keynote

Setup instructions for OS X:

  1. Install highlight:

    bash$ brew install highlight
  2. Put slides.theme in /usr/local/share/highlight/themes

  3. Install and start Sublime Text 3

  4. Put Highlight Scala.sublime-build in ~/Library/Application Support/Sublime Text 3/Packages/User/

  5. Open a Scala source file

  6. Select the Tools > Build System > Highlight Scala menu option

  7. Hit Cmd+B to copy highlighted source to your clipboard

  8. Paste into Keynote (works against a black background)

{
"shell_cmd": "highlight -O rtf -t 2 -K 32 -k 'PragmataPro' --syntax scala --style slides $file_path/$file_name | pbcopy"
}
Description="Dave's Theme for Keynote Slides"
Default = { Colour="#ffffff" }
Canvas = { Colour="#000000" }
Number = { Colour="#129bfa" }
Escape = { Colour="#9fe94e" }
String = { Colour="#7fd94e" }
StringPreProc = { Colour="#ffff00" }
BlockComment = { Colour="#777777" }
PreProcessor = { Colour="#777777" }
LineNum = { Colour="#777777" }
Operator = { Colour="#ffffff" }
LineComment = BlockComment
Interpolation = Escape
Keywords = {
{ Colour= "#e7a23c" },
{ Colour= "#00ff00" },
{ Colour= "#ff0000" },
{ Colour= "#ffffff" },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment