Skip to content

Instantly share code, notes, and snippets.

@kepbod
Last active October 1, 2023 13:28
Show Gist options
  • Save kepbod/2ea79ee2ada4c22591dc043c1ed4364c to your computer and use it in GitHub Desktop.
Save kepbod/2ea79ee2ada4c22591dc043c1ed4364c to your computer and use it in GitHub Desktop.
use italics in iterm2
{ infocmp -1 xterm-256color ; echo "\tsitm=\\E[3m,\n\tritm=\\E[23m,"; } > /tmp/xterm-256color.terminfo
tic /tmp/xterm-256color.terminfo
@ests
Copy link

ests commented May 20, 2017

Thanks, contrary to many other solutions I've found, this actually worked.

@insubnia
Copy link

It's simple and awesome compared to other solutions!!! thanks a lot!!

@ramzihizi
Copy link

how do I use this?
Thank You!

@kepbod
Copy link
Author

kepbod commented Sep 26, 2019

Simply copy these commands to your terminal and it will work. :)

@brandon1024
Copy link

Thanks for this! I've seen a lot of people online create a whole new terminal profile (e.g. xterm-256color-italic), but I prefer just updating the existing one.

This didn't work without a few changes though. The echo here doesn't format correctly. This worked:

echo -e "\tsitm=\\\E[3m,\n\tritm=\\\E[23m,"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment