diff options
author | Brett Cannon <bcannon@gmail.com> | 2006-02-25 14:52:53 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2006-02-25 14:52:53 (GMT) |
commit | a4fe18227d48edbb41b76f2861be2c6b800c6609 (patch) | |
tree | 666bc9322232ff4f78cfe24359b6dbf140a6de30 /Misc/Vim/syntax_test.py | |
parent | d074beb6925a87874600b605a91a23263b3a6028 (diff) | |
download | cpython-a4fe18227d48edbb41b76f2861be2c6b800c6609.zip cpython-a4fe18227d48edbb41b76f2861be2c6b800c6609.tar.gz cpython-a4fe18227d48edbb41b76f2861be2c6b800c6609.tar.bz2 |
Add a script that auto-generates a Vim syntax highlighting file for Python.
Just symlink or copy python.vim to ~/.vim/syntax/ . Also included is a sample
Python file with basic expressions to make sure they are highlighted.
Also add a Vim directory in Misc to hold all Vim configuration files.
Diffstat (limited to 'Misc/Vim/syntax_test.py')
-rw-r--r-- | Misc/Vim/syntax_test.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Misc/Vim/syntax_test.py b/Misc/Vim/syntax_test.py new file mode 100644 index 0000000..67b3199 --- /dev/null +++ b/Misc/Vim/syntax_test.py @@ -0,0 +1,36 @@ +"""Test file for syntax highlighting of editors. + +Meant to cover a wide range of different types of statements and expressions. +Not necessarily sensical. + +""" +assert True +def foo(): pass +foo() # Uncoloured +while False: pass +1 and 2 +if False: pass +from sys import path +# Comment +# XXX catch your attention +'single-quote', u'unicode' +"double-quote" +"""triple double-quote""" +'''triple single-quote''' +r'raw' +ur'unicode raw' +'escape\n' +'\04' # octal +'\xFF' # hex +'\u1111' # unicode character +1 +1L +1.0 +.1 +1+2j +[] # Uncoloured +{} # Uncoloured +() # Uncoloured +all +GeneratorExit +trailing_whitespace = path |