Use "htmlmixed" mode for ".tmpl" files