Skip to content

Instantly share code, notes, and snippets.

@beci
Forked from limingjie/256 colors.md
Created March 11, 2019 11:57
Show Gist options
  • Save beci/2660f5167556b0a94e78662f3ebf06ab to your computer and use it in GitHub Desktop.
Save beci/2660f5167556b0a94e78662f3ebf06ab 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