How to actually get italics and true colour to work in iTerm + tmux + vim

Configure terminfo

xterm-256color-italic|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
tmux-256color|tmux with 256 colors,
ritm=\E[23m, rmso=\E[27m, sitm=\E[3m, smso=\E[7m, Ms@,
khome=\E[1~, kend=\E[4~,
use=xterm-256color, use=screen-256color,
$ tic -x xterm-256color-italic.terminfo
$ tic -x tmux-256color.terminfo

Configure iTerm

Configure tmux

set -g default-terminal 'tmux-256color'
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'

Configure vim

let &t_8f="\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors


alias ssh='TERM=xterm-256color ssh'
eval $(TERM=xterm dircolors)
alias ls='ls --color=auto'





Software Engineer in Melbourne, Australia —

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

New Public Agents at ThinkTel

New Public Agents at ThinkTel

Android Studio tips & tricks -Part 2(Advanced)

Explain the KUBERNETES to 5 years old.

Smartbridge Hackathon — Innovation Towards Success

The Four Pillars of Object-Oriented Programming

Speeding PHP with FFI

Growing as a Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jake Barnes

Jake Barnes

Software Engineer in Melbourne, Australia —

More from Medium

Customizing your development terminal

“zsh compinit: insecure files” Prompt on oh-my-zsh

Add your choice of notification channels to Monika

Reviving a 2009 MacBook Pro with Lubuntu