|
1 | 1 | " Vim syntax file
|
2 |
| -" ModAuthor: Mathias Köhler |
3 |
| -" Modiefied version of: |
4 |
| -" Language: Python |
5 |
| -" Maintainer: Dmitry Vasiliev <dima at hlabs dot org> |
6 |
| -" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/python/python.vim |
7 |
| -" Last Change: 2012-02-11 |
8 |
| -" Filenames: *.py |
9 |
| -" Version: 2.6.7 |
10 | 2 | "
|
11 |
| -" Based on python.vim (from Vim 6.1 distribution) |
12 |
| -" by Neil Schemenauer <nas at python dot ca> |
| 3 | +" Modification: |
| 4 | +" |
| 5 | +" Author: Mathias Koehler |
| 6 | +" Last Change: 2012-03-05 |
| 7 | +" |
| 8 | +" Based on: |
| 9 | +" |
| 10 | +" Language: Python |
| 11 | +" Maintainer: Dmitry Vasiliev <dima at hlabs dot org> |
| 12 | +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/python/python.vim |
| 13 | +" Last Change: 2012-02-11 |
| 14 | +" Filenames: *.py |
| 15 | +" Version: 2.6.7 |
| 16 | +" |
| 17 | +" Which based on python.vim (from Vim 6.1 distribution) |
| 18 | +" by Neil Schemenauer <nas at python dot ca> |
13 | 19 | "
|
14 | 20 | " Thanks:
|
15 | 21 | "
|
@@ -143,9 +149,9 @@ syn region pythonParam start="[a-zA-Z_]" end="\(,\|)\s*:\)" contained contains
|
143 | 149 | syn match pythonParamName "[a-zA-Z_][a-zA-Z0-9_]*" contained nextgroup=pythonDefaultAssignment skipwhite skipnl
|
144 | 150 | syn match pythonDefaultAssignment "=" nextgroup=pythonParamDefault skipwhite contained skipnl
|
145 | 151 |
|
146 |
| -syn region pythonFuncCall start="[a-zA-Z_][a-zA-Z0-9_]*(" end=")" keepend contains=pythonFuncCallName,pythonFuncCallArgs |
| 152 | +syn region pythonFuncCall start="[a-zA-Z_][a-zA-Z0-9_]*(" end=")" contains=pythonFuncCallName,pythonFuncCallArgs |
147 | 153 | syn match pythonFuncCallName "[a-zA-Z_][a-zA-Z0-9_]*" display contained nextgroup=pythonFuncCallArgs skipwhite
|
148 |
| -syn region pythonFuncCallArgs start="("ms=s+1 end=")"me=e-1 contained contains=@pythonStringType,@pythonNumberType,@pythonBuiltin,pythonFuncCallKwargs |
| 154 | +syn region pythonFuncCallArgs start="("ms=s+1 end=")"me=e-1 contained contains=pythonFuncCall,@pythonStringType,@pythonNumberType,@pythonBuiltin,pythonFuncCallKwargs |
149 | 155 |
|
150 | 156 | syn match pythonFuncCallKwargs "[a-zA-Z_][a-zA-Z0-9_]*\s*=" display contained contains=pythonKey,pythonKeyAssign
|
151 | 157 | syn match pythonKey "[a-zA-Z_][a-zA-Z0-9_]*" display contained nextgroup=pythonKeyAssign skipwhite
|
@@ -255,8 +261,10 @@ if exists("python_highlight_string_templates") && python_highlight_string_templa
|
255 | 261 | syn match pythonStrTemplate "\$[a-zA-Z_][a-zA-Z0-9_]*" contained containedin=pythonString,pythonUniString,pythonRawString,pythonUniRawString
|
256 | 262 | endif
|
257 | 263 |
|
258 |
| -syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained |
259 |
| -syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained |
| 264 | +if exists("python_highlight_doctests") && python_highlight_doctests != 0 |
| 265 | + syn region pythonDocTest start="^\s*>>>" end=+'''+he=s-1 end="^\s*$" contained |
| 266 | + syn region pythonDocTest2 start="^\s*>>>" end=+"""+he=s-1 end="^\s*$" contained |
| 267 | +endif |
260 | 268 |
|
261 | 269 | " Numbers (ints, longs, floats, complex)
|
262 | 270 | syn match pythonHexError "\<0[xX]\x*[g-zG-Z]\x*[lL]\=\>" display
|
|
0 commit comments