From 895c87acf2af6ead40ba226a4fca62eab9f12dd6 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 30 Jul 2009 12:29:14 +0200 Subject: update python highlighting file --- .vim/syntax/python.vim | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.vim') diff --git a/.vim/syntax/python.vim b/.vim/syntax/python.vim index 3f739af..04cf875 100644 --- a/.vim/syntax/python.vim +++ b/.vim/syntax/python.vim @@ -2,9 +2,9 @@ " Language: Python " Maintainer: Dmitry Vasiliev " URL: http://www.hlabs.spb.ru/vim/python.vim -" Last Change: 2008-09-29 +" Last Change: 2009-07-24 " Filenames: *.py -" Version: 2.6.3 +" Version: 2.6.5 " " Based on python.vim (from Vim 6.1 distribution) " by Neil Schemenauer @@ -18,6 +18,8 @@ " (strings and comments) " John Eikenberry " for the patch fixing small typo +" Caleb Adamantine +" for the patch fixing highlighting for decorators " " Options: @@ -108,7 +110,7 @@ syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" display contained syn keyword pythonRepeat for while syn keyword pythonConditional if elif else -syn keyword pythonImport import from as +syn keyword pythonPreCondit import from as syn keyword pythonException try except finally syn keyword pythonOperator and in is not or @@ -117,7 +119,9 @@ if !exists("python_print_as_function") || python_print_as_function == 0 endif " Decorators (new in Python 2.4) -syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite +syn match pythonDecorator "@" display nextgroup=pythonDottedName skipwhite +syn match pythonDottedName "[a-zA-Z_][a-zA-Z0-9_]*\(\.[a-zA-Z_][a-zA-Z0-9_]*\)*" display contained +syn match pythonDot "\." display containedin=pythonDottedName " Comments syn match pythonComment "#.*$" display contains=pythonTodo,@Spell @@ -295,7 +299,7 @@ if version >= 508 || !exists("did_python_syn_inits") endif HiLink pythonStatement Statement - HiLink pythonImport Statement + HiLink pythonPreCondit Statement HiLink pythonFunction Function HiLink pythonConditional Conditional HiLink pythonRepeat Repeat @@ -303,6 +307,8 @@ if version >= 508 || !exists("did_python_syn_inits") HiLink pythonOperator Operator HiLink pythonDecorator Define + HiLink pythonDottedName Function + HiLink pythonDot Normal HiLink pythonComment Comment HiLink pythonCoding Special -- cgit v1.2.3-24-g4f1b