Strangeness with italic font over ssh + screen

63 views
Skip to first unread message

David Woodfall

unread,
Nov 9, 2017, 3:45:08 PM11/9/17
to vim...@googlegroups.com
I have just setup vim to print comments in italics on my laptop. I
scp'd my vim files over to my server and find that if I just ssh in
italics work, but if I start a screen session italics don't work.

These are the settings I use in vim (real escapes):

let &t_ZH="^[[3m"
let &t_ZR="^[[23m"

highlight Comment cterm=italic

I have tested in vim and also by doing:

echo -e "\e[3m foo \e[23m"

I am using terminator-gtk3 locally for screen and also to log in to
screen on my server.

I have the same versions screen and vim on both my server and laptop.
I also have the same ~/.fonts and ~/.terminfo directories on both.

The screenrcs have the same term and termcapinfo settings:

term screen-256color
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'

I have tried setting term in vim to screen-256color-italic, but it
hasn't helped. Instead of italics I get reversed text.

Any ideas what is going wrong?

David Woodfall

unread,
Nov 9, 2017, 7:36:04 PM11/9/17
to vim...@googlegroups.com
I managed to find a cure. When I start screen (and also reconnect) I
need to do:

TERM=screen-256color screen [-r]

That seems to have fixed it.
Reply all
Reply to author
Forward
0 new messages