I want to use vimtex and enable highlighting for all filetypes, except tex files. For tex files I explicitly want to disable highlighting.

How could I do that?

Important: The solution should allow to use <leader>ll for compilation of the tex files, without enabling highlighting again!

1 Answer 1


I would install a personal syntax file, e.g. in .vim/syntax/tex.vim, to override the default with the content:

let b:current_syntax = 'tex'

In addition, you should add

let g:vimtex_syntax_enabled = 0

to prevent vimtex from patching the syntax script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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