1

I am playing around with conceal options in latex, and I would appreciate some help. I am using neovim os OS X if that makes a difference. I have the following settings in my config file

Plug 'lervag/vimtex'


let g:tex_flavor='latex'
hi Conceal ctermfg=Blue

(full config here in case it's necessary)

But this is completely ignored, and when I open vim in a math file the following happens, what is happening

I tried adding "hi clear Conceal" to the config file, but this gets ignored as well. I should add that both commands work when I call them from vim (i.e. :hi clear Conceal, :hi Conceal ctermfg:Blue).

Many thanks for your help in advance!

1
4

I suspect the Conceal highlighting is overriden by your colorscheme os something like that. You will see where it is defined with :verbose highlight Conceal, which should show an output similar to this:

:verbose hi Conceal
Conceal        xxx ctermfg=4 guifg=#268bd2
        Last set from ~/.vim/colors/my_colorscheme.vim line 1234

I suggest you read this writeup by romainl to learn how to properly override highlighting outside of a colorscheme script.


By the way, from version 2.0 of Vimtex, you don't need to specify g:tex_favor, unless you explicitly want to set it to context or plaintex.

1
  • 2
    Thanks, this did the trick. Apparently indentLine was overriding my colour setting (and not my colorscheme weirdly), since I don't use it anyway I just removed it and everything works now.
    – Me.
    Dec 10 '20 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.