I noticed that when I create a
.tex from within Vim itself, in a later session that file is detected as
plaintex, while already existing files are detected with the
tex filetype (note: both of them have the
.tex file extension).
I noticed it, since the syntax highlighting was different between the two.
I then created
after\ftplugin\plaintex.vim in which I added
which does change the
filetype, but it does not apply the relative syntax highlighting. I guess because this is done after the buffer is already loaded and processed.
I then tried with
setfiletype tex set filetype=tex
It didn't work either.
I think the last option would be to work with either
script.vim to set filetype before built-in detection.
How can I make Vim assign the
"tex" filetype when creating
I've been trying to solve this myself, without success.