Created
April 7, 2017 23:04
-
-
Save stuartcarnie/818d14647cd1a42a4fbbcd689675b8c0 to your computer and use it in GitHub Desktop.
One-liner to ensure italics are rendered as reverse when using tmux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir $HOME/.terminfo/ && \ | |
screen_terminfo="screen-256color" && \ | |
infocmp "$screen_terminfo" | sed \ | |
-e 's/^screen[^|]*|[^,]*,/screen-256color|screen with italics support,/' \ | |
-e 's/%?%p1%t;3%/%?%p1%t;7%/' \ | |
-e 's/smso=[^,]*,/smso=\\E[7m,/' \ | |
-e 's/rmso=[^,]*,/rmso=\\E[27m,/' \ | |
-e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/' > /tmp/screen.terminfo && \ | |
tic /tmp/screen.terminfo && \ | |
echo set -g default-terminal "screen-256color" | tee -a ~/.tmux.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment