34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
import sets, sys
|
|
import color, commands, default, lex, lex_tt, 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.grammar = lex_tt.TTGrammar()
|
|
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 = {
|
|
'template': color.build('magenta', 'default'),
|
|
'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 "Template"
|