Our software has many .xml configuration files. Vim colors these files, using e.g.
/usr/share/vim/vim74/syntax/xml.vim. But can we customize the coloring for just these files, and not for all .xml files?
(An example of such customizing would be coloring the text between
</schmoo> tags. But this question isn't about how to color, nor is it about XML. I hope for an answer that applies equally well to Python or YAML or hundreds of other formats.)
Can another file in the .xml files' directory override or extend
syntax/xml.vim? (Unlikely: runtimepath doesn't mention the current directory; neither do
getcwd() seem to help.)
What about something in an environment variable, or in an .xml file itself (at the top or bottom; or inline like jsbegin/jsend in Vim custom syntax highlighting, include other language syntax in a specified range)?
Or must the extensions go into each user's
~/.vim/after/syntax/xml.vim (which is used for all .xml files)? That would be suboptimal, but tolerable for extensions specialized enough to not collide with other things (like "schmoo" above).