Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuration for 24bit true colors terminal with italic
set -g default-terminal 'tmux-256color'
# Enable 24 bit true colors
set -ga terminal-overrides ',*: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
You can’t perform that action at this time.