Skip to content

Instantly share code, notes, and snippets.

@pwm
Last active December 16, 2016 15:46
Show Gist options
  • Save pwm/b0214da162771ed569b7b59289c9d4dd to your computer and use it in GitHub Desktop.
Save pwm/b0214da162771ed569b7b59289c9d4dd to your computer and use it in GitHub Desktop.
Keynote - Fish function for copy&pasting highlighted code
# You will first need to install highlight:
# brew install highlight
function keynote-code-hl --argument-names 'syntax'
if test -n "$syntax"
pbpaste | highlight \
--syntax=$syntax \
--font Menlo \
--font-size 24 \
--style anotherdark \
--out-format rtf \
| pbcopy
else
echo "Usage: keynote-code-hl <syntax>"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment