What's the difference between `syntax` and `filetype` in Vim?
filetype
affects more things than syntax
(for example: syntax highlighting, indenting rules, and other plugins). So generally, you should use filetype
unless you only want to change the syntax highlighting.
http://vim.wikia.com/wiki/Filetype.vim