Shell Italic text in terminal showing up with gray background rather than italic

I have both a FreeBSD and a Linux VPS node that I SSH into. On Linux, when there is italic text (e.g., a vim syntax file with cterm=italic) it shows up italic. On FreeBSD, however, the italic text shows up as black text on a gray background. I am wondering if there is a way to fix this so that the text is actually italic.

I've been RTFM and have deduced that grotty may be relevant, but nothing on the manpage seems to speak to this. Any help would be appreciated.
 
In the section 2 (Terminal options) of Vim documentaion you can find two options for italic handling, most likely they are set to different defaults in you VPSs:
t_ZH italics mode
t_ZR italics end

The following values work for me:
Code:
set t_ZH=^[[3m
set t_ZR=^[[23m
You can add them to your ~/.vimrc.
The symbol ^[ is a literal Esc, can be inserted by Ctrl-v Esc.
 
In the section 2 (Terminal options) of Vim documentaion you can find two options for italic handling, most likely they are set to different defaults in you VPSs:
t_ZH italics mode
t_ZR italics end

The following values work for me:
Code:
set t_ZH=^[[3m
set t_ZR=^[[23m
You can add them to your ~/.vimrc.
The symbol ^[ is a literal Esc, can be inserted by Ctrl-v Esc.

Thanks much. For some reason, I had to use a slight variation:

Code:
let &t_ZH="\e[3m"
let &t_ZR="\e[23m"
I'm not sure why or what the difference is, but it's working now.
 
Back
Top