Skip to content

Instantly share code, notes, and snippets.

@joshnesbitt
Created October 13, 2014 13:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshnesbitt/5b55fb8824b8e7c18788 to your computer and use it in GitHub Desktop.
Save joshnesbitt/5b55fb8824b8e7c18788 to your computer and use it in GitHub Desktop.
function code_highlight(){
style=${1:-zmrok}
pbpaste | highlight --syntax=rb --style=$style -O rtf | pbcopy
}
@joshnesbitt
Copy link
Author

Use it:

  • Copy code to clipboard
  • Run code_highlight
  • Paste RTF content to Keynote

@joshnesbitt
Copy link
Author

Note that it also requires the highlight command (brew install highlight).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment