Vim autocmd FileType not being evaluated on startup

Tag: windows , vim , vimrc Author: qiangzhuang Date: 2012-07-23

I have written

autocmd! FileType tex set nonumber

in my _vimrc (running Windows), but when I open up my test.tex I still see line numbers. If, after opening the file, I type set filetype=tex then the line numbers disappear.

How can I get it to evaluate when I open the file?

Best Answer

Try

autocmd! FileType plaintex set nonumber

comments:

That would have never occurred to me.