Skip to content

Instantly share code, notes, and snippets.

@jackwasey
Forked from limingjie/256 colors.md
Created September 16, 2020 23:41
Show Gist options
  • Save jackwasey/eddc194bb44cb9a144750e3e1354e5f9 to your computer and use it in GitHub Desktop.
Save jackwasey/eddc194bb44cb9a144750e3e1354e5f9 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