Re: How to map file extension for syntax highlighting
> > > I have file with CFG extension that's actually XML. I'd like vim toset
> > > the syntax coloring to XML format. How can I do this?setfiletype")
> > this should be as simple as ":setfiletype xml" (see ":help
> That'll work while I've got the file in vim, but how can I set it so it'syou should be able to put this in "xmlconfig" syntax file that is activated
> applied automatically when the file is opened?
on *.cfg buffers containing the xml prolog (<?xml version="1.0"?>) as seen
in the filetype.vim file. If you look at how xml files are identified in
filetype.vim, you should be able to copy and tweak it to load an
xmlconfig.vim from your syntax directory wherein you ":setf xml".
Somebody please correct me if I'm way off base here :*)