Browse Source

Fixed highlighting for raw bytes literals

Dmitry Vasiliev 13 years ago
parent
commit
d510d31b02
3 changed files with 16 additions and 6 deletions
  1. 4
    0
      CHANGES.txt
  2. 8
    6
      python3.0.vim
  3. 4
    0
      test.py

+ 4
- 0
CHANGES.txt View File

1
+Revision 3.0.4 (2010-11-09):
2
+
3
+    - Fixed highlighting for raw bytes literals
4
+
1
 Revision 3.0.3 (2010-04-09):
5
 Revision 3.0.3 (2010-04-09):
2
 
6
 
3
     - Applied patch by Andrea Riciputi with new configuration options
7
     - Applied patch by Andrea Riciputi with new configuration options

+ 8
- 6
python3.0.vim View File

2
 " Language:	Python
2
 " Language:	Python
3
 " Maintainer:	Dmitry Vasiliev <dima@hlabs.spb.ru>
3
 " Maintainer:	Dmitry Vasiliev <dima@hlabs.spb.ru>
4
 " URL:		http://www.hlabs.spb.ru/vim/python3.0.vim
4
 " URL:		http://www.hlabs.spb.ru/vim/python3.0.vim
5
-" Last Change:	2010-04-09
5
+" Last Change:	2010-11-09
6
 " Filenames:	*.py
6
 " Filenames:	*.py
7
-" Version:	3.0.3
7
+" Version:	3.0.4
8
 "
8
 "
9
 " Based on python.vim (from Vim 6.1 distribution)
9
 " Based on python.vim (from Vim 6.1 distribution)
10
 " by Neil Schemenauer <nas@python.ca>
10
 " by Neil Schemenauer <nas@python.ca>
22
 "        for the patch fixing highlighting for decorators
22
 "        for the patch fixing highlighting for decorators
23
 "    Andrea Riciputi
23
 "    Andrea Riciputi
24
 "        for the patch with new configuration options
24
 "        for the patch with new configuration options
25
+"    Anton Butanaev
26
+"        for the patch fixing raw bytes literals highlighting
25
 
27
 
26
 "
28
 "
27
 " Options:
29
 " Options:
173
 syn match  pythonEscapeError	"\\N{[^A-Z ]\+}" display contained
175
 syn match  pythonEscapeError	"\\N{[^A-Z ]\+}" display contained
174
 
176
 
175
 " Raw strings
177
 " Raw strings
176
-syn region pythonRawString	start=+[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
177
-syn region pythonRawString	start=+[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
178
-syn region pythonRawString	start=+[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
179
-syn region pythonRawString	start=+[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
178
+syn region pythonRawString	start=+[bB]\=[rR]'+ skip=+\\\\\|\\'\|\\$+ excludenl end=+'+ end=+$+ keepend contains=pythonRawEscape,@Spell
179
+syn region pythonRawString	start=+[bB]\=[rR]"+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end=+$+ keepend contains=pythonRawEscape,@Spell
180
+syn region pythonRawString	start=+[bB]\=[rR]"""+ end=+"""+ keepend contains=pythonDocTest2,pythonSpaceError,@Spell
181
+syn region pythonRawString	start=+[bB]\=[rR]'''+ end=+'''+ keepend contains=pythonDocTest,pythonSpaceError,@Spell
180
 
182
 
181
 syn match pythonRawEscape	+\\['"]+ display transparent contained
183
 syn match pythonRawEscape	+\\['"]+ display transparent contained
182
 
184
 

+ 4
- 0
test.py View File

76
 
76
 
77
 b"тестtest"
77
 b"тестtest"
78
 
78
 
79
+br"test"
80
+
81
+br"\a\b"
82
+
79
 # Formattings
83
 # Formattings
80
 
84
 
81
 " %f "
85
 " %f "