Last active
December 16, 2016 15:46
-
-
Save pwm/b0214da162771ed569b7b59289c9d4dd to your computer and use it in GitHub Desktop.
Keynote - Fish function for copy&pasting highlighted code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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