33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
|
import sets, sys
|
||
|
import color, commands, default, lex, lex_xml, method, mode, point, regex, tab_xml
|
||
|
|
||
|
class XML(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 = {
|
||
|
'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.highlighter.lex_buffer()
|
||
|
#self.get_regions()
|
||
|
self.tabber = tab_xml.XMLTabber(self)
|
||
|
|
||
|
def name(self):
|
||
|
return "XML"
|