Skip to content

Instantly share code, notes, and snippets.

@trygvis
Created September 7, 2012 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trygvis/3663745 to your computer and use it in GitHub Desktop.
Save trygvis/3663745 to your computer and use it in GitHub Desktop.
Useful snippet to select the correct terminal on Linux and OSX.
# http://vim.wikia.com/wiki/256_colors_in_vim
if [ -z "$SSH_CLIENT" ]
then
if [ -r /usr/share/terminfo/x/xterm-256color -o -r /lib/terminfo/x/xterm-256color -o `uname -s` = Darwin ]
then
export TERM='xterm-256color'
else
export TERM='xterm-color'
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment