Hi,
I'm quite a noob in vim, but I think the following behaviour is not normal.
vimtex highlights emphasized and italic (\emph{abc} or \textit{abc}) text in a solid (inverted) block, like so:

I'm using a slightly customized version of the evening default theme, where I explicitly set:
hi texItalStyle cterm=underline gui=underline
Otherwise, I have not interfered with visuals that could impact this.
Plus, the same issue happens with any colorscheme I load. To make it get away, I have to reload the colorscheme, so I actually put an autocommand to reload the theme for every .tex buffer.
What could be the problem?
My full .vimrc is here and the custom colorscheme is here.
In rest, my config is quite clean, as I'm only a beginner in vim.
Thanks!
First, you can control whether or not to show italized or bolded text in tex files with g:tex_fast (see :h g:tex_fast).
That said, I think your issue may be one of two things: Either your colorscheme is not correct, or your terminal settings are not correct. You can test terminal support for italics by executing $ echo -e "\e[3mfoo\e[23m".
Do you have the same problem in gui vim/gvim?
Which syntax highlight groups are recognized with your <leader>sy mapping on the italized text? Just to make sure it is actually the texItalStyle groups... also, in a clean vim instance (without opening any tex files), how does the output of :high look like for the texItalStyle group?
Thanks, I learned quite a lot from this.
So, to answer:
Italic text allowed in my profile. So your example writes foo normally, no italic;mvim, the \emph text is not italicized, nor highlighted. So I could say that the problem does not occur, but neither does any highlighting for \emph happen there;<leader>sy shows texItalStyle for \emph and :high shows this:
Although, honestly, I don't know what's setting it like that, my scheme setting underline for that group, both for cterm and gui. And yes, my scheme could very well be damaged, but I'm still having the problem with any colorscheme. So it's either from some general vim setting, or from iTerm. However, reenabling italic support in iTerm does not fix it.
All in all, thank you very much for indicating g:tex_fast. I have disabled bold and italic from there, since I don't want them anyway.
So I could say that the issue is solved, since I actually wanted italics and bolds rendered normally. But I would be curious to find what's actually setting texItalStyle to underline, as showed by :high.
The texItalStyle is set to italic by the filetype syntax plugin, which is loaded after your colorscheme. Thus it ends up overriding your own setting from your colorscheme. You can see that by doing :high before and after loading a LaTeX file.
One option here is to add a filetype syntax plugin to an after folder, see :h after-directory. E.g., if you create .vim/after/syntax/tex.vim with the highlight commands, these will override the default ones defined by the standard syntax plugin.
Thanks again for the great support! I'll do that and keep enjoying your plugin. :)
:)