parent
1f1f6ff3c4
commit
fe680f26dc
|
@ -444,7 +444,8 @@ class Application(object):
|
||||||
raise FileError("not a file or dir: %r" % path)
|
raise FileError("not a file or dir: %r" % path)
|
||||||
try:
|
try:
|
||||||
b.open()
|
b.open()
|
||||||
except buffer.BinaryDataException:
|
#except buffer.BinaryDataException:
|
||||||
|
except:
|
||||||
if binary:
|
if binary:
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -150,6 +150,8 @@ class SvnLog(Method):
|
||||||
mesg_data = '\n'.join(mesg_lines).strip()
|
mesg_data = '\n'.join(mesg_lines).strip()
|
||||||
if mesg_data:
|
if mesg_data:
|
||||||
mesg_data += '\n'
|
mesg_data += '\n'
|
||||||
|
mesg_data = mesg_data.replace('[', '\\[')
|
||||||
|
mesg_data = mesg_data.replace(']', '\\]')
|
||||||
return '[b:d:*]' + log_data + '\n' + mesg_data
|
return '[b:d:*]' + log_data + '\n' + mesg_data
|
||||||
def _execute(self, w, **vargs):
|
def _execute(self, w, **vargs):
|
||||||
cmd = "svn log %r" % w.buffer.path
|
cmd = "svn log %r" % w.buffer.path
|
||||||
|
|
|
@ -31,7 +31,9 @@ class RSTGrammar(Grammar):
|
||||||
PatternRule(r'reference', r'[a-zA-Z]+_(?![a-zA-Z0-9_])'),
|
PatternRule(r'reference', r'[a-zA-Z]+_(?![a-zA-Z0-9_])'),
|
||||||
RegionRule(r'inline_internal', r'_`', RSTString2, r'`'),
|
RegionRule(r'inline_internal', r'_`', RSTString2, r'`'),
|
||||||
|
|
||||||
RegionRule(r'substitution', r'\|(?! )', RSTString3, r'\|'),
|
#RegionRule(r'substitution', r'\|(?! )', RSTString3, r'\|'),
|
||||||
|
PatternRule('substitution', r'r\|[^ ]+\|'),
|
||||||
|
#RegionRule(r'substitution', r'\|(?! )', RSTString3, r'\|'),
|
||||||
PatternRule(r'footnote', r'\[[0-9]+\]_'),
|
PatternRule(r'footnote', r'\[[0-9]+\]_'),
|
||||||
PatternRule(r'citation', r'\[.+?\]_'),
|
PatternRule(r'citation', r'\[.+?\]_'),
|
||||||
PatternRule(r'rst_url', r'http://[^ ]+'),
|
PatternRule(r'rst_url', r'http://[^ ]+'),
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from tab import StackTabber2
|
from tab import StackTabber2
|
||||||
from mode import Fundamental
|
from mode import Fundamental
|
||||||
from lex import Grammar, PatternRule, RegionRule, PatternMatchRule
|
from lex import Grammar, PatternRule, RegionRule, PatternMatchRule
|
||||||
|
from mode.sh import ShGrammar
|
||||||
from mode.xml import XMLGrammar
|
from mode.xml import XMLGrammar
|
||||||
from mode.pipe import Pipe
|
from mode.pipe import Pipe
|
||||||
from method.shell import Interact
|
from method.shell import Interact
|
||||||
|
@ -36,6 +37,7 @@ class ScalaGrammar(Grammar):
|
||||||
rules = [
|
rules = [
|
||||||
PatternRule('scala.comment', '//.*$'),
|
PatternRule('scala.comment', '//.*$'),
|
||||||
RegionRule('scala.comment', r'/\*', NestedCommentGrammar, r'\*/'),
|
RegionRule('scala.comment', r'/\*', NestedCommentGrammar, r'\*/'),
|
||||||
|
RegionRule('scala.script', r'#!.+$', ShGrammar, r'!#'),
|
||||||
|
|
||||||
PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)([a-zA-Z0-9_]+)',
|
PatternMatchRule('x', r'(?<=[a-zA-Z0-9_ ])(:)([a-zA-Z0-9_]+)',
|
||||||
'delimiter', 'scala.type'),
|
'delimiter', 'scala.type'),
|
||||||
|
@ -72,6 +74,7 @@ class ScalaGrammar(Grammar):
|
||||||
PatternRule('scala.float', r'-?[0-9]+\.[0-9]*'), # FIXME
|
PatternRule('scala.float', r'-?[0-9]+\.[0-9]*'), # FIXME
|
||||||
|
|
||||||
PatternRule('scala.char', r"'(?:[^'\\]|\\u[0-9A-Fa-f]{4}|\\[0-7]{1,3}|\\[btnfr\"'\\])'"),
|
PatternRule('scala.char', r"'(?:[^'\\]|\\u[0-9A-Fa-f]{4}|\\[0-7]{1,3}|\\[btnfr\"'\\])'"),
|
||||||
|
RegionRule('scala.string', '"""', Grammar, '"""'),
|
||||||
RegionRule('scala.string', '"', StringGrammar, '"'),
|
RegionRule('scala.string', '"', StringGrammar, '"'),
|
||||||
PatternRule('scala.symbol', "'[a-zA-Z_][a-zA-Z0-9_]*"),
|
PatternRule('scala.symbol', "'[a-zA-Z_][a-zA-Z0-9_]*"),
|
||||||
|
|
||||||
|
@ -206,6 +209,9 @@ class Scala(Fundamental):
|
||||||
}
|
}
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
|
'scala.script.start': hi_red,
|
||||||
|
'scala.script.end': hi_red,
|
||||||
|
|
||||||
'scala.annotation': lo_green,
|
'scala.annotation': lo_green,
|
||||||
'scala.pseudo': hi_magenta,
|
'scala.pseudo': hi_magenta,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue