'Italics not working in fish on my Mac Terminal and Vim

This includes several other things that don't work, like

\e[21m double underline \e[21m,

\e[4:3m curly underline \e[4:3m,

\e[7m reverse \e[27m and

\e[9m strikethrough \e[29m, while bold, dim, blink, colors and backgrounds work perfectly. I want to focus on italics, but if someone knows a fix for all or can connect the issues please do tell me. Now:

Vim and terminal both don't like italics. Note that my colorscheme for vim is set to default.

in terminal in vim

What have I tried so far:

1. Changing .vimrc

I added following to my .vimrc, which changed nothing to the display in the screenshot above.

let &t_ZH="\e[3m"
let &t_ZR="\e[23m"

2. xterm-256color-italic.terminfo

I am neither a sysadmin nor mac-expert. I just did exactly what was described here, both options via profiles and via tic, but neither worked. I wanted to try or you can just replace /usr/share/terminfo/78/xterm-256color with ~/.terminfo/78/xterm-256color-italic but didn't figure out how i would've done that. I tried with mv but that didn't work

I am now stuck here with no idea what issue is caused by fish, what by terminal, what by vim and maybe tmux too? I hope someone here knows what to do in this scenario.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source