I'm using the vim-pandoc-snytax plugin to syntax-highlight pandoc-flavoured markdown. If I mark text as italic like this *italic*
, it is displayed with a white background:
All the rest of the syntax highlighting works fine, just this white background of italic text is very disturbing.
I'm using Vim 8.0 installed from Homebrew on Mac 10.11.1. I observe the same behaviour in Terminal.app and iTerm. Currently, I use the built-in slate colour scheme, but this white background appears in any colour scheme I use.
Moreover, this white background appears whenever I set the filetype to one of :setf markdown
, :setf markdown.pandoc
, and :setf pandoc
. That is, this white background appears also without the vim-pandoc-syntax plugin, if I just activate the built-in markdown syntax highlighting.
How can this white background of italic text be removed?
Apparently, the problem was that vim tried to format the text enclosed in *
as italic, but the terminal, in which vim was running, didn't support italic text.
The Mac Terminal app doesn't support italic text at all. In iTerm, italic text can be enabled in Preferences > Profiles > Text.
After enabling italic text in iTerm, the white background didn't appear anymore, and instead the text was correctly displayed in italics.