Skip to content

Instantly share code, notes, and snippets.

@AndCycle
Forked from limingjie/256 colors.md
Created May 30, 2016 18:52
Show Gist options
  • Save AndCycle/2cf3e0cd9040182e364d100a1ba0a337 to your computer and use it in GitHub Desktop.
Save AndCycle/2cf3e0cd9040182e364d100a1ba0a337 to your computer and use it in GitHub Desktop.
256 colors in putty, tmux/screen and vim

#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.

  • putty

    Set Connection -> Data -> Terminal-type string to xterm-256color

  • tmux

    Add this line to ~/.tmux.conf

    set -g default-terminal "screen-256color"
    
  • screen

    Add this line to ~/.screenrc

    term "screen-256color"
    
  • vim

    Add these lines to ~/.vimrc

    if &term == "screen"
      set t_Co=256
    endif
    

View actural 256 colors by this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment