I believe that pygments could benefit if it were able to find vim (and possible other kinds of) modelines in files and prefer the information supplied in them over language autodetection.
I would be happy to write some code for this but I'd like to get a few tips on how would you like such a feature implemented. Most importantly, whether you would prefer the modeline parsing code in pygments itself or should I start working on a separate (and more complete) modeline parsing module for Python.
I'd also like to know how best to plug it into Pygments. It'd be probably a good idea to add an additional (optional) property to various syntaxes, specifying the 'vim names' for them.