views:

157

answers:

1

Hi,

how do I tell vim to use a certain syntax definition with a new file extension ? Let's say I have files that are some kind of xml, but have a different extension, how do I let vim know that it should use syntax=xml by default for that new type ?

Any help appreciated.

+4  A: 

Put this at the end of your .vimrc (I'm assuming you have autocommands enabled).

autocmd BufEnter *.xmlx set filetype=xml
Dan Loewenherz
Very quick, thanks !
Homer J. Simpson
No problem at all!
Dan Loewenherz

related questions