summaryrefslogtreecommitdiffstats
path: root/Misc/Vim
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-01-29 04:18:04 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-01-29 04:18:04 (GMT)
commit8fff20f950d75577bbab09dc543e22db13e7cbe5 (patch)
tree33f330dca42103dd89596c5b5311cd7a21da677f /Misc/Vim
parent870d0c28716e979660546cc1aa54272f771cedeb (diff)
downloadcpython-8fff20f950d75577bbab09dc543e22db13e7cbe5.zip
cpython-8fff20f950d75577bbab09dc543e22db13e7cbe5.tar.gz
cpython-8fff20f950d75577bbab09dc543e22db13e7cbe5.tar.bz2
Update Vim syntax highlighting to specify what revision was used to generate
the file.
Diffstat (limited to 'Misc/Vim')
-rw-r--r--Misc/Vim/python.vim7
-rw-r--r--Misc/Vim/syntax_test.py5
-rw-r--r--Misc/Vim/vim_syntax.py5
3 files changed, 9 insertions, 8 deletions
diff --git a/Misc/Vim/python.vim b/Misc/Vim/python.vim
index 5e6b429..2f82285 100644
--- a/Misc/Vim/python.vim
+++ b/Misc/Vim/python.vim
@@ -1,4 +1,4 @@
-" Auto-generated Vim syntax file for Python
+" Auto-generated Vim syntax file for Python (trunk: r60376M).
"
" To use: copy or symlink to ~/.vim/syntax/python.vim
@@ -64,7 +64,7 @@ endif
if exists("python_highlight_builtins")
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 buffer bytes 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
@@ -73,7 +73,8 @@ if exists("python_highlight_builtins")
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
+ syn keyword pythonBuiltin super trunc tuple type unichr unicode vars xrange
+ syn keyword pythonBuiltin zip
endif
diff --git a/Misc/Vim/syntax_test.py b/Misc/Vim/syntax_test.py
index ccc7f30..1d20866 100644
--- a/Misc/Vim/syntax_test.py
+++ b/Misc/Vim/syntax_test.py
@@ -4,9 +4,8 @@ Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical or comprehensive (assume that if one exception is
highlighted that all are, for instance).
-Highlighting extraneous whitespace at the end of the line is not represented
-here as all trailing whitespace is automatically removed from .py files in the
-repository.
+Extraneous trailing whitespace can't be tested because of svn pre-commit hook
+checks for such things.
"""
# Comment
diff --git a/Misc/Vim/vim_syntax.py b/Misc/Vim/vim_syntax.py
index 55dd277..57a30e4 100644
--- a/Misc/Vim/vim_syntax.py
+++ b/Misc/Vim/vim_syntax.py
@@ -4,8 +4,9 @@ import keyword
import exceptions
import __builtin__
from string import Template
+from sys import subversion
-comment_header = '''" Auto-generated Vim syntax file for Python.
+comment_header = '''" Auto-generated Vim syntax file for Python (%s: r%s).
"
" To use: copy or symlink to ~/.vim/syntax/python.vim'''
@@ -160,7 +161,7 @@ FILL = 80
def main(file_path):
with open(file_path, 'w') as FILE:
# Comment for file
- print>>FILE, comment_header
+ print>>FILE, comment_header % subversion[1:]
print>>FILE, ''
# Statements at start of file
print>>FILE, statement_header