diff options
author | Brett Cannon <bcannon@gmail.com> | 2006-09-20 19:28:35 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2006-09-20 19:28:35 (GMT) |
commit | c8939d23fe24df04e3365427d3b00df97c2792c4 (patch) | |
tree | 8ef47feeef3c00405f2cade9b15964199867c324 /Misc/Vim | |
parent | f6aa86e33ba5b29ff9bd442e80e196746b5d2424 (diff) | |
download | cpython-c8939d23fe24df04e3365427d3b00df97c2792c4.zip cpython-c8939d23fe24df04e3365427d3b00df97c2792c4.tar.gz cpython-c8939d23fe24df04e3365427d3b00df97c2792c4.tar.bz2 |
Make python.vim output more deterministic.
Diffstat (limited to 'Misc/Vim')
-rw-r--r-- | Misc/Vim/python.vim | 56 | ||||
-rw-r--r-- | Misc/Vim/vim_syntax.py | 8 |
2 files changed, 32 insertions, 32 deletions
diff --git a/Misc/Vim/python.vim b/Misc/Vim/python.vim index 61d75e2..5e6b429 100644 --- a/Misc/Vim/python.vim +++ b/Misc/Vim/python.vim @@ -62,39 +62,39 @@ endif if exists("python_highlight_builtins") - syn keyword pythonBuiltin unichr all set abs vars int __import__ unicode - syn keyword pythonBuiltin enumerate reduce coerce intern exit issubclass - syn keyword pythonBuiltin divmod file Ellipsis apply isinstance open any - syn keyword pythonBuiltin locals help filter basestring slice copyright min - syn keyword pythonBuiltin super sum tuple hex execfile long id xrange chr - syn keyword pythonBuiltin complex bool zip pow dict True oct NotImplemented - syn keyword pythonBuiltin map None float hash getattr buffer max reversed - syn keyword pythonBuiltin object quit len repr callable credits setattr - syn keyword pythonBuiltin eval frozenset sorted ord __debug__ hasattr - syn keyword pythonBuiltin delattr False input license classmethod type - syn keyword pythonBuiltin raw_input list iter compile reload range globals - syn keyword pythonBuiltin staticmethod str property round dir cmp + syn keyword pythonBuiltin Ellipsis False None NotImplemented True __debug__ + syn keyword pythonBuiltin __import__ abs all any apply basestring bool + syn keyword pythonBuiltin buffer callable chr classmethod cmp coerce + syn keyword pythonBuiltin compile complex copyright credits delattr dict + syn keyword pythonBuiltin dir divmod enumerate eval execfile exit file + syn keyword pythonBuiltin filter float frozenset getattr globals hasattr + syn keyword pythonBuiltin hash help hex id input int intern isinstance + syn keyword pythonBuiltin issubclass iter len license list locals long map + syn keyword pythonBuiltin max min object oct open ord pow property quit + syn keyword pythonBuiltin range raw_input reduce reload repr reversed round + syn keyword pythonBuiltin set setattr slice sorted staticmethod str sum + syn keyword pythonBuiltin super tuple type unichr unicode vars xrange zip endif if exists("python_highlight_exceptions") - syn keyword pythonException GeneratorExit ImportError RuntimeError - syn keyword pythonException UnicodeTranslateError MemoryError StopIteration - syn keyword pythonException PendingDeprecationWarning EnvironmentError - syn keyword pythonException LookupError OSError DeprecationWarning - syn keyword pythonException UnicodeError UnicodeEncodeError - syn keyword pythonException FloatingPointError ReferenceError NameError - syn keyword pythonException IOError SyntaxError - syn keyword pythonException FutureWarning ImportWarning SystemExit - syn keyword pythonException Exception EOFError StandardError ValueError - syn keyword pythonException TabError KeyError ZeroDivisionError SystemError - syn keyword pythonException UnicodeDecodeError IndentationError - syn keyword pythonException AssertionError TypeError IndexError - syn keyword pythonException RuntimeWarning KeyboardInterrupt UserWarning - syn keyword pythonException SyntaxWarning UnboundLocalError ArithmeticError - syn keyword pythonException Warning NotImplementedError AttributeError - syn keyword pythonException OverflowError BaseException + syn keyword pythonException ArithmeticError AssertionError AttributeError + syn keyword pythonException BaseException DeprecationWarning EOFError + syn keyword pythonException EnvironmentError Exception FloatingPointError + syn keyword pythonException FutureWarning GeneratorExit IOError ImportError + syn keyword pythonException ImportWarning IndentationError IndexError + syn keyword pythonException KeyError KeyboardInterrupt LookupError + syn keyword pythonException MemoryError NameError NotImplementedError + syn keyword pythonException OSError OverflowError PendingDeprecationWarning + syn keyword pythonException ReferenceError RuntimeError RuntimeWarning + syn keyword pythonException StandardError StopIteration SyntaxError + syn keyword pythonException SyntaxWarning SystemError SystemExit TabError + syn keyword pythonException TypeError UnboundLocalError UnicodeDecodeError + syn keyword pythonException UnicodeEncodeError UnicodeError + syn keyword pythonException UnicodeTranslateError UnicodeWarning + syn keyword pythonException UserWarning ValueError Warning + syn keyword pythonException ZeroDivisionError endif diff --git a/Misc/Vim/vim_syntax.py b/Misc/Vim/vim_syntax.py index 3f2a3d8..55dd277 100644 --- a/Misc/Vim/vim_syntax.py +++ b/Misc/Vim/vim_syntax.py @@ -5,9 +5,9 @@ import exceptions import __builtin__ from string import Template -comment_header = """" Auto-generated Vim syntax file for Python +comment_header = '''" Auto-generated Vim syntax file for Python. " -" To use: copy or symlink to ~/.vim/syntax/python.vim""" +" To use: copy or symlink to ~/.vim/syntax/python.vim''' statement_header = """ if exists("b:current_syntax") @@ -30,14 +30,14 @@ boolean_ops = ('and', 'in', 'is', 'not', 'or') import_stmts = ('import', 'from') object_defs = ('def', 'class') -exception_names = frozenset(exc for exc in dir(exceptions) +exception_names = sorted(exc for exc in dir(exceptions) if not exc.startswith('__')) # Need to include functions that start with '__' (e.g., __import__), but # nothing that comes with modules (e.g., __name__), so just exclude anything in # the 'exceptions' module since we want to ignore exceptions *and* what any # module would have -builtin_names = frozenset(builtin for builtin in dir(__builtin__) +builtin_names = sorted(builtin for builtin in dir(__builtin__) if builtin not in dir(exceptions)) escapes = (r'+\\[abfnrtv\'"\\]+', r'"\\\o\{1,3}"', r'"\\x\x\{2}"', |