Skip to content

Instantly share code, notes, and snippets.

@andersonba
Last active July 13, 2016 19:46
Show Gist options
  • Save andersonba/46af2c48166c78e617181e76f03dd018 to your computer and use it in GitHub Desktop.
Save andersonba/46af2c48166c78e617181e76f03dd018 to your computer and use it in GitHub Desktop.
Code snippets for Keynote presentations

Use code highlighting in Keynote

Instead of taking printscreen or pasting a plain text in your Keynote presentations, follow these steps and make it beautiful.

  1. brew install highlight
  2. highlight -O rtf filename.js |pbcopy
  3. Paste in your presentation

If you use fish shell, you could use the code_to_keynote function in this gist, see how:

  1. vim ~/.config/fish/functions/code_to_keynote.fish and paste my function
  2. reload your fish . ~/.config/fish/config.fish
  3. code_to_keynote filename.js
  4. Paste in your presentation
function code_to_keynote --description 'Highlight code to paste in Keynote'
switch (count $argv)
case 0
echo 'Which file? Enter the filename'
return 1
case 1
highlight -O rtf $argv[1] |pbcopy
echo 'Now, you can paste in Keynote'
return 0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment