|
@@ -2,9 +2,9 @@
|
2
|
2
|
" Language: Python
|
3
|
3
|
" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru>
|
4
|
4
|
" URL: http://www.hlabs.spb.ru/vim/python3.0.vim
|
5
|
|
-" Last Change: 2010-11-09
|
|
5
|
+" Last Change: 2010-11-11
|
6
|
6
|
" Filenames: *.py
|
7
|
|
-" Version: 3.0.4
|
|
7
|
+" Version: 3.0.5
|
8
|
8
|
"
|
9
|
9
|
" Based on python.vim (from Vim 6.1 distribution)
|
10
|
10
|
" by Neil Schemenauer <nas@python.ca>
|
|
@@ -23,7 +23,7 @@
|
23
|
23
|
" Andrea Riciputi
|
24
|
24
|
" for the patch with new configuration options
|
25
|
25
|
" Anton Butanaev
|
26
|
|
-" for the patch fixing raw bytes literals highlighting
|
|
26
|
+" for the patch fixing bytes literals highlighting
|
27
|
27
|
|
28
|
28
|
"
|
29
|
29
|
" Options:
|
|
@@ -139,7 +139,7 @@ syn match pythonCoding "\%^.*\%(\n.*\)\?#.*coding[:=]\s*[0-9A-Za-z-_.]\+.*$"
|
139
|
139
|
syn keyword pythonTodo TODO FIXME XXX contained
|
140
|
140
|
|
141
|
141
|
" Errors
|
142
|
|
-" syn match pythonError "\<\d\+\D\+\>" display
|
|
142
|
+syn match pythonError "\<\d\+\D\+\>" display
|
143
|
143
|
syn match pythonError "[$?]" display
|
144
|
144
|
syn match pythonError "[&|]\{2,}" display
|
145
|
145
|
syn match pythonError "[=]\{3,}" display
|
|
@@ -183,13 +183,13 @@ syn region pythonRawString start=+[bB]\=[rR]'''+ end=+'''+ keepend contains=pyth
|
183
|
183
|
syn match pythonRawEscape +\\['"]+ display transparent contained
|
184
|
184
|
|
185
|
185
|
" Bytes
|
186
|
|
-syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,@Spell
|
187
|
|
-syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,@Spell
|
188
|
|
-syn region pythonBytes start=+[bB]"""+ end=+"""+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,pythonDocTest2,pythonSpaceError,@Spell
|
189
|
|
-syn region pythonBytes start=+[bB]'''+ end=+'''+ keepend contains=pythonBytesContent,pythonBytesError,pythonBytesEscape,pythonBytesEscapeError,pythonDocTest,pythonSpaceError,@Spell
|
|
186
|
+syn region pythonBytes start=+[bB]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
|
|
187
|
+syn region pythonBytes start=+[bB]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonBytesError,pythonBytesContent,@Spell
|
|
188
|
+syn region pythonBytes start=+[bB]"""+ end=+"""+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest2,pythonSpaceError,@Spell
|
|
189
|
+syn region pythonBytes start=+[bB]'''+ end=+'''+ keepend contains=pythonBytesError,pythonBytesContent,pythonDocTest,pythonSpaceError,@Spell
|
190
|
190
|
|
191
|
|
-syn match pythonBytesContent "[\u0001-\u007f]\+" display contained
|
192
|
|
-syn match pythonBytesError "[^\u0001-\u007f]\+" display contained
|
|
191
|
+syn match pythonBytesError ".\+" display contained
|
|
192
|
+syn match pythonBytesContent "[\u0000-\u00ff]\+" display contained contains=pythonBytesEscape,pythonBytesEscapeError
|
193
|
193
|
|
194
|
194
|
syn match pythonBytesEscape +\\[abfnrtv'"\\]+ display contained
|
195
|
195
|
syn match pythonBytesEscape "\\\o\o\=\o\=" display contained
|
|
@@ -230,10 +230,11 @@ syn match pythonHexNumber "\<0[xX]\x\+\>" display
|
230
|
230
|
syn match pythonOctNumber "\<0[oO]\o\+\>" display
|
231
|
231
|
syn match pythonBinNumber "\<0[bB][01]\+\>" display
|
232
|
232
|
|
|
233
|
+syn match pythonNumberError "\<\d\+\D\>" display
|
|
234
|
+syn match pythonNumberError "\<0\d\+\>" display
|
233
|
235
|
syn match pythonNumber "\<\d\>" display
|
234
|
236
|
syn match pythonNumber "\<[1-9]\d\+\>" display
|
235
|
237
|
syn match pythonNumber "\<\d\+[jJ]\>" display
|
236
|
|
-syn match pythonNumberError "\<0\d\+\>" display
|
237
|
238
|
|
238
|
239
|
syn match pythonFloat "\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" display
|
239
|
240
|
syn match pythonFloat "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" display
|