This is a much simpler version, following your advices. I'd appreciate opinion on the new code.
I have also updated the alias list. However, there is still some conflict between how templates are done. In pygments, the names like 'smarty' are for plain Smarty, while vim treats that as HTML+Smarty.