I want to run a command in the .vimrc in case a file is a latex file. I think I have something with the syntax, it does not work. Any clue?
if &filetype=='tex' set spell endif
You can use auto commands to achieve what you want:
autocmd BufNewFile,BufRead *.tex set spell
1.4m articles
1.4m replys
5 comments
57.0k users