From: Brett Cannon Date: Wed, 1 Mar 2006 04:28:00 +0000 (+0000) Subject: Add Misc/NEWS entry for Misc/Vim/vim_syntax.py . Also use conditional X-Git-Tag: v2.5a0~451 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=acde7347a547ce515b42805cb18789591c03c016;p=thirdparty%2FPython%2Fcpython.git Add Misc/NEWS entry for Misc/Vim/vim_syntax.py . Also use conditional expression for the hell of it. --- diff --git a/Misc/NEWS b/Misc/NEWS index 63c2874c3779..accbcd09267c 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -911,6 +911,10 @@ New platforms Tools/Demos ----------- +- Created Misc/Vim/vim_syntax.py to auto-generate a python.vim file in that + directory for syntax highlighting in Vim. Vim directory was added and placed + vimrc to it (was previous up a level). + - Added two new files to Tools/scripts: pysource.py, which recursively finds Python source files, and findnocoding.py, which finds Python source files that need an encoding declaration. diff --git a/Misc/Vim/vim_syntax.py b/Misc/Vim/vim_syntax.py index a4df48564680..8ef5bb89d0dd 100644 --- a/Misc/Vim/vim_syntax.py +++ b/Misc/Vim/vim_syntax.py @@ -65,10 +65,7 @@ def str_regexes(): skip = skip_regex.substitute(sep=separator) else: skip = '' - if not raw: - contains = 'contains=pythonEscape' - else: - contains = '' + contains = 'contains=pythonEscape' if not raw else '' yield regex_template.substitute(raw=raw, sep=separator, skip=skip, contains = contains)