summaryrefslogtreecommitdiffstats
path: root/.vim/syntax
diff options
context:
space:
mode:
authorFlorian Pritz <f-p@gmx.at>2009-07-30 12:29:14 +0200
committerFlorian Pritz <f-p@gmx.at>2009-07-30 12:29:14 +0200
commit895c87acf2af6ead40ba226a4fca62eab9f12dd6 (patch)
tree52c3f51b4ccfed912f6b003ffbc4275d64a6bbbc /.vim/syntax
parent554b07e4f122e4dc4fdc2a64ed70caf4027e8c12 (diff)
downloaddotfiles-895c87acf2af6ead40ba226a4fca62eab9f12dd6.tar.gz
dotfiles-895c87acf2af6ead40ba226a4fca62eab9f12dd6.tar.xz
update python highlighting file
Diffstat (limited to '.vim/syntax')
-rw-r--r--.vim/syntax/python.vim16
1 files changed, 11 insertions, 5 deletions
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 <dima@hlabs.spb.ru>
" 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 <nas@python.ca>
@@ -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