parent
4d3769233e
commit
d3fa803e76
|
@ -116,7 +116,7 @@ class Application(object):
|
|||
'make', 'mini', 'mutt', 'nasm', 'ocaml', 'perl', 'python',
|
||||
'replace', 'rst', 'scheme', 'search', 'sh', 'sql', 'tt',
|
||||
'text', 'text2', 'which', 'xml', 'cheetah', 'colortext',
|
||||
'latex', 'insertmini')
|
||||
'latex', 'insertmini', 'conf')
|
||||
for name in names:
|
||||
exec("import mode.%s; mode.%s.install(self)" % (name, name))
|
||||
|
||||
|
|
|
@ -137,9 +137,3 @@ class BufferList(object):
|
|||
def is_buffer_hidden(self, b):
|
||||
assert b in self.buffers, "buffer %s does not exist" % (b.name())
|
||||
return b in self.hidden_buffers
|
||||
# def is_buffer_visible(self, b):
|
||||
# assert b in self.buffers, "buffer %s does not exist" % (b.name())
|
||||
# for slot in self.slots:
|
||||
# if slot.buffer is b:
|
||||
# return True
|
||||
# return False
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import color, mode
|
||||
from lex import Grammar, PatternRule, RegionRule
|
||||
from mode.sh import StringGrammar
|
||||
|
||||
class ConfGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule(r'comment', r'#.*$'),
|
||||
RegionRule(r'string', r"'", Grammar, r"'"),
|
||||
RegionRule(r'string', r'"', StringGrammar, r'"'),
|
||||
]
|
||||
|
||||
class Conf(mode.Fundamental):
|
||||
modename = 'conf'
|
||||
extensions = ['.conf', '.cfg', '.cnf', '.config']
|
||||
grammar = ConfGrammar
|
||||
colors = {}
|
||||
|
||||
install = Conf.install
|
Loading…
Reference in New Issue