Created
October 13, 2014 13:27
-
-
Save joshnesbitt/5b55fb8824b8e7c18788 to your computer and use it in GitHub Desktop.
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
function code_highlight(){ | |
style=${1:-zmrok} | |
pbpaste | highlight --syntax=rb --style=$style -O rtf | pbcopy | |
} |
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
Use it:
code_highlight