Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c8939d23
Commit
c8939d23
authored
Sep 20, 2006
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make python.vim output more deterministic.
parent
f6aa86e3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
32 deletions
+36
-32
Misc/NEWS
Misc/NEWS
+4
-0
Misc/Vim/python.vim
Misc/Vim/python.vim
+28
-28
Misc/Vim/vim_syntax.py
Misc/Vim/vim_syntax.py
+4
-4
No files found.
Misc/NEWS
View file @
c8939d23
...
...
@@ -103,6 +103,10 @@ Documentation
Tools
-----
-
Make
auto
-
generated
python
.
vim
file
list
built
-
ins
and
exceptions
in
alphatbetical
order
.
Makes
output
more
deterministic
and
easier
to
tell
if
the
file
is
stale
or
not
.
-
Bug
#
1546372
:
Fixed
small
bugglet
in
pybench
that
caused
a
missing
file
not
to
get
reported
properly
.
...
...
Misc/Vim/python.vim
View file @
c8939d23
...
...
@@ -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 s
taticmethod str property round
dir
cm
p
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 s
uper tuple type unichr unicode vars xrange zi
p
endif
if
exists
(
"python_highlight_exceptions"
)
syn
keyword pythonException
GeneratorExit ImportError Runtim
eError
syn
keyword pythonException
UnicodeTranslateError MemoryError StopIteration
syn
keyword pythonException
PendingDeprecationWarning Environme
ntError
syn
keyword pythonException
LookupError OSError DeprecationWarning
syn
keyword pythonException
UnicodeError UnicodeEncode
Error
syn
keyword pythonException
FloatingPointError ReferenceError Name
Error
syn
keyword pythonException
IOError Syntax
Error
syn
keyword pythonException
FutureWarning ImportWarning SystemExit
syn
keyword pythonException
Exception EOFError StandardError ValueError
syn
keyword pythonException
TabError KeyError ZeroDivisionError System
Error
syn
keyword pythonException
UnicodeDecodeError Indentation
Error
syn
keyword pythonException
AssertionError TypeError Index
Error
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 Attribut
eError
syn
keyword pythonException
BaseException DeprecationWarning EOFError
syn
keyword pythonException
EnvironmentError Exception FloatingPoi
ntError
syn
keyword pythonException
FutureWarning GeneratorExit IOError ImportError
syn
keyword pythonException
ImportWarning IndentationError Index
Error
syn
keyword pythonException
KeyError KeyboardInterrupt Lookup
Error
syn
keyword pythonException
MemoryError NameError NotImplemented
Error
syn
keyword pythonException
OSError OverflowError PendingDeprecationWarning
syn
keyword pythonException
ReferenceError RuntimeError RuntimeWarning
syn
keyword pythonException
StandardError StopIteration Syntax
Error
syn
keyword pythonException
SyntaxWarning SystemError SystemExit Tab
Error
syn
keyword pythonException
TypeError UnboundLocalError UnicodeDecode
Error
syn
keyword pythonException
UnicodeEncodeError UnicodeError
syn
keyword pythonException
UnicodeTranslateError UnicodeWarning
syn
keyword pythonException
UserWarning ValueError Warning
syn
keyword pythonException
ZeroDivisionError
endif
...
...
Misc/Vim/vim_syntax.py
View file @
c8939d23
...
...
@@ -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}"'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment