1
0
mirror of https://github.com/gryf/python-syntax.git synced 2025-12-17 19:40:26 +01:00

Fixed highlighting for decorators

This commit is contained in:
Dmitry Vasiliev
2009-07-24 13:09:13 +04:00
parent 4f9e8d7c0f
commit 4fc6d28416
4 changed files with 27 additions and 6 deletions

View File

@@ -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.4
" 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:
@@ -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
@@ -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