Last active
April 4, 2018 08:24
-
-
Save caryfuk/85e53ff0bf1178a5baf0 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
### Terminal Syntax Highlighting | |
# Setup: "brew install highlight" | |
# Pipe Highlight to less | |
export LESSOPEN="| $(which highlight) %s --out-format xterm256 --line-numbers --quiet --force --style solarized-light" | |
export LESS=" -R" | |
alias less='less -m -N -g -i -J --line-numbers --underline-special' | |
alias more='less' | |
# Use "highlight" in place of "cat" | |
alias cat="highlight $1 --out-format xterm256 --line-numbers --quiet --force --style solarized-light" | |
# Setup JSON Syntax Highlighting | |
# Copy js.lang to json.lang with the following command | |
# cp "$(dirname $(brew list highlight | head -n 1))/share/highlight/langDefs/js.lang" "$(dirname $(brew list highlight | head -n 1))/share/highlight/langDefs/json.lang" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment