I open tex files with vim, but some files are recognized as filetype plaintex, some others as filetype tex. Why is so ? What is the trigger that recognizes the file as tex (which has the highlighting I want) ?

link|improve this question

59% accept rate
feedback

2 Answers

Are you using the LaTeX-suite plugin? If so, then you probably want

let g:tex_flavor='latex'

in your .vimrc.

link|improve this answer
feedback

More than I ever wanted to know about this subject: http://vimdoc.sourceforge.net/htmldoc/filetype.html

To disable one of the file types, add a line in your filetype file, see |remove-filetype|.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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