Skip to content

Instantly share code, notes, and snippets.

@jpesce
Last active September 17, 2020 13:02
Show Gist options
  • Save jpesce/00359f98486ac75582d6fb46825d3be7 to your computer and use it in GitHub Desktop.
Save jpesce/00359f98486ac75582d6fb46825d3be7 to your computer and use it in GitHub Desktop.
[Iterm With Italics] Enable italics in iTerm
#!/bin/bash
# Override the local entry for xterm-256color
# See https://eddieantonio.ca/blog/2015/04/16/iterm-italics/
# Only affects your machine so remote machines simply won’t display italics
# which is better than having to create workarounds for ssh and tmux
infocmp xterm-256color > /tmp/xterm-256color.terminfo
printf '\tsitm=\\E[3m, ritm=\\E[23m,\n' >> /tmp/xterm-256color.terminfo
tic /tmp/xterm-256color.terminfo
# Or if you prefere to create a new terminfo and have an ssh alias:
# https://medium.com/@dubistkomisch/how-to-actually-get-italics-and-true-colour-to-work-in-iterm-tmux-vim-9ebe55ebc2be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment