import sets, sys import color, commands, default, lex, lex_xml, method, mode, point, regex, tab_xml class Template(mode.Fundamental): def __init__(self, w): mode.Fundamental.__init__(self, w) self.grammar = lex_xml.XMLGrammar() self.lexer = lex.Lexer(self.grammar) self.add_bindings('close-paren', (')',)) self.add_bindings('close-brace', ('}',)) self.add_bindings('close-bracket', (']',)) self.default_color = color.build('default', 'default') self.colors = { 'markup': color.build('red', 'default'), 'namespace': color.build('magenta', 'default'), 'opentag': color.build('blue', 'default'), 'nodevalue': color.build('default', 'default'), 'attrname': color.build('cyan', 'default'), 'attrvalue': color.build('green', 'default'), 'closetag': color.build('blue', 'default'), 'comment': color.build('red', 'default'), 'bizzaro': color.build('magenta', 'green'), } self.tabber = tab_xml.XMLTabber(self) def name(self): return "XML"