Skip to content

Instantly share code, notes, and snippets.

@sos4nt
Created July 27, 2012 12:13
Show Gist options
  • Save sos4nt/3187620 to your computer and use it in GitHub Desktop.
Save sos4nt/3187620 to your computer and use it in GitHub Desktop.
A xterm-256color based TERMINFO that adds the escape sequences for italic
# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
# tic xterm-256color-italic.terminfo
#
# Usage:
#
# export TERM=xterm-256color-italic
#
xterm-256color-italic|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
@szurcher
Copy link

szurcher commented Mar 6, 2014

Thanks for this!

@bric3
Copy link

bric3 commented May 12, 2015

Note if you do SSH, environment may be passed on the remote and it will probable don't know this terminal. A possible solution on the local host is to alias ssh

alias ssh="TERM=xterm-256color ssh"

@dkarter
Copy link

dkarter commented Jan 6, 2017

Thank you @bric3 that worked great for SSH connections! 💯

@branquito
Copy link

Thank you!

@brandonkal
Copy link

brandonkal commented May 2, 2019

This is the first result in Google so here is a cleaner way:
Change line 11 to:

# A xterm-256color based TERMINFO that adds the escape sequences for italic.
#
# Install:
#
#   tic -o ~/.terminfo xterm-256color.terminfo
#
#   Note: by writing to the home folder, we override the default 256color theme.
#   We could instead save this as another name, but that would report a terminal
#   that an ssh host does not understand, which causes issues with the delete key.
#
# Usage:
#
#   export TERM=xterm-256color
#
xterm-256color|xterm with 256 colors and italic,
	sitm=\E[3m, ritm=\E[23m,
	use=xterm-256color,

This avoids the need to add an ssh alias as the correct terminal will be reported to hosts.

@markpanado
Copy link

Thanks for this! Solved my problem with hyper terminal and vim-gruvbox

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