Skip to content

Instantly share code, notes, and snippets.

@aurelienbottazini
Forked from oblitum/.tmux.conf
Created March 6, 2018 13:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aurelienbottazini/6b7a26f7d6ff80458843885c90b94c82 to your computer and use it in GitHub Desktop.
Save aurelienbottazini/6b7a26f7d6ff80458843885c90b94c82 to your computer and use it in GitHub Desktop.
Configuration for 24bit true colors terminal with italic
set -g default-terminal 'tmux-256color'
# Enable 24 bit true colors
set -ga terminal-overrides ',xterm-256color*:Tc'
set t_ut= " fix 256 colors in tmux http://sunaku.github.io/vim-256color-bce.html
if has("termguicolors") " set true colors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
  • tested to work on macOS iTerm2 and Windows WSL terminals based on mintty.

  • tic the terminfo files

  • configure the terminal emulator to use xterm-256color-italic

  • on ArchLinux (WSL or not), tic'ing tmux-256color.terminfo is generally not needed, it's already provided and can be referred from .tmux.conf without problems

tmux-256color|tmux with 256 colors,
ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m,
use=xterm-256color, use=screen-256color,
xterm-256color-italic|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment