Skip to content

Instantly share code, notes, and snippets.

@odedlaz
Last active December 25, 2016 21:06
Show Gist options
  • Select an option

  • Save odedlaz/32282ffb2f37c2caacb133f57959154e to your computer and use it in GitHub Desktop.

Select an option

Save odedlaz/32282ffb2f37c2caacb133f57959154e to your computer and use it in GitHub Desktop.
less_syntax_highlight
# The following adds syntax highlighting to various programming languages
# Credit goes to Ter Smitten: https://goo.gl/64YU4u
export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
export LESS=' -R '
# The following adds syntax highlighting to man pages
# Credit goes to Todd Weed: https://goo.gl/ZSbwZI
export LESS_TERMCAP_mb=$'\e[01;31m' # begin blinking
export LESS_TERMCAP_md=$'\e[01;38;5;74m' # begin bold
export LESS_TERMCAP_me=$'\e[0m' # end mode
export LESS_TERMCAP_se=$'\e[0m' # end standout-mode
export LESS_TERMCAP_so=$'\E[37;44m' # begin standout-mode - info box
export LESS_TERMCAP_ue=$'\e[0m' # end underline
export LESS_TERMCAP_us=$'\e[04;38;5;146m' # begin underline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment