[Python-checkins] r42712 - in python/trunk/Misc: NEWS Vim/vim_syntax.py

brett.cannon python-checkins at python.org
Wed Mar 1 05:28:45 CET 2006


Author: brett.cannon
Date: Wed Mar  1 05:28:00 2006
New Revision: 42712

Modified:
   python/trunk/Misc/NEWS
   python/trunk/Misc/Vim/vim_syntax.py
Log:
Add Misc/NEWS entry for Misc/Vim/vim_syntax.py .  Also use conditional
expression for the hell of it.


Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Wed Mar  1 05:28:00 2006
@@ -911,6 +911,10 @@
 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.

Modified: python/trunk/Misc/Vim/vim_syntax.py
==============================================================================
--- python/trunk/Misc/Vim/vim_syntax.py	(original)
+++ python/trunk/Misc/Vim/vim_syntax.py	Wed Mar  1 05:28:00 2006
@@ -65,10 +65,7 @@
                 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)
 


More information about the Python-checkins mailing list