blob: 59675c37449ec13575606e706a2779ab9eecc3f8 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: Python
Bram Moolenaar541f92d2015-06-19 13:27:23 +02003" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +02004" Last Change: 2016 Aug 14
Bram Moolenaar541f92d2015-06-19 13:27:23 +02005" Credits: Neil Schemenauer <nas@python.ca>
Bram Moolenaar5c736222010-01-06 20:54:52 +01006" Dmitry Vasiliev
Bram Moolenaar071d4272004-06-13 20:20:40 +00007"
Bram Moolenaar5c736222010-01-06 20:54:52 +01008" This version is a major rewrite by Zvezdan Petkovic.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009"
Bram Moolenaar5c736222010-01-06 20:54:52 +010010" - introduced highlighting of doctests
11" - updated keywords, built-ins, and exceptions
12" - corrected regular expressions for
Bram Moolenaar071d4272004-06-13 20:20:40 +000013"
Bram Moolenaar5c736222010-01-06 20:54:52 +010014" * functions
15" * decorators
16" * strings
17" * escapes
18" * numbers
19" * space error
Bram Moolenaar071d4272004-06-13 20:20:40 +000020"
Bram Moolenaar5c736222010-01-06 20:54:52 +010021" - corrected synchronization
22" - more highlighting is ON by default, except
23" - space error highlighting is OFF by default
Bram Moolenaar071d4272004-06-13 20:20:40 +000024"
Bram Moolenaar5c736222010-01-06 20:54:52 +010025" Optional highlighting can be controlled using these variables.
Bram Moolenaar071d4272004-06-13 20:20:40 +000026"
Bram Moolenaar5c736222010-01-06 20:54:52 +010027" let python_no_builtin_highlight = 1
28" let python_no_doctest_code_highlight = 1
29" let python_no_doctest_highlight = 1
30" let python_no_exception_highlight = 1
31" let python_no_number_highlight = 1
32" let python_space_error_highlight = 1
Bram Moolenaar071d4272004-06-13 20:20:40 +000033"
Bram Moolenaar5c736222010-01-06 20:54:52 +010034" All the options above can be switched on together.
Bram Moolenaar071d4272004-06-13 20:20:40 +000035"
Bram Moolenaar5c736222010-01-06 20:54:52 +010036" let python_highlight_all = 1
Bram Moolenaar071d4272004-06-13 20:20:40 +000037"
38
Bram Moolenaar5c736222010-01-06 20:54:52 +010039" For version 5.x: Clear all syntax items.
40" For version 6.x: Quit when a syntax file was already loaded.
Bram Moolenaar071d4272004-06-13 20:20:40 +000041if version < 600
42 syntax clear
43elseif exists("b:current_syntax")
44 finish
45endif
46
Bram Moolenaar00659062010-09-21 22:34:02 +020047" We need nocompatible mode in order to continue lines with backslashes.
48" Original setting will be restored.
49let s:cpo_save = &cpo
50set cpo&vim
51
Bram Moolenaar5c736222010-01-06 20:54:52 +010052" Keep Python keywords in alphabetical order inside groups for easy
53" comparison with the table in the 'Python Language Reference'
Bram Moolenaarf9132812015-07-21 19:19:13 +020054" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
55" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
Bram Moolenaar5c736222010-01-06 20:54:52 +010056" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
57" Exceptions come last at the end of each group (class and def below).
58"
59" Keywords 'with' and 'as' are new in Python 2.6
60" (use 'from __future__ import with_statement' in Python 2.5).
61"
Bram Moolenaarf9132812015-07-21 19:19:13 +020062" Some compromises had to be made to support both Python 3 and 2.
63" We include Python 3 features, but when a definition is duplicated,
Bram Moolenaar5c736222010-01-06 20:54:52 +010064" the last definition takes precedence.
65"
Bram Moolenaarf9132812015-07-21 19:19:13 +020066" - 'False', 'None', and 'True' are keywords in Python 3 but they are
67" built-ins in 2 and will be highlighted as built-ins below.
68" - 'exec' is a built-in in Python 3 and will be highlighted as
Bram Moolenaar5c736222010-01-06 20:54:52 +010069" built-in below.
Bram Moolenaarf9132812015-07-21 19:19:13 +020070" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
71" - 'print' is a built-in in Python 3 and will be highlighted as
72" built-in below (use 'from __future__ import print_function' in 2)
Bram Moolenaarca635012015-09-25 20:34:21 +020073" - async and await were added in Python 3.5 and are soft keywords.
Bram Moolenaar5c736222010-01-06 20:54:52 +010074"
Bram Moolenaar6f1d9a02016-07-24 14:12:38 +020075syn keyword pythonStatement False None True
Bram Moolenaar5c736222010-01-06 20:54:52 +010076syn keyword pythonStatement as assert break continue del exec global
77syn keyword pythonStatement lambda nonlocal pass print return with yield
78syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
79syn keyword pythonConditional elif else if
Bram Moolenaar071d4272004-06-13 20:20:40 +000080syn keyword pythonRepeat for while
Bram Moolenaar071d4272004-06-13 20:20:40 +000081syn keyword pythonOperator and in is not or
Bram Moolenaar5c736222010-01-06 20:54:52 +010082syn keyword pythonException except finally raise try
83syn keyword pythonInclude from import
Bram Moolenaarca635012015-09-25 20:34:21 +020084syn keyword pythonAsync async await
Bram Moolenaar071d4272004-06-13 20:20:40 +000085
Bram Moolenaar9c102382006-05-03 21:26:49 +000086" Decorators (new in Python 2.4)
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +020087" Python 3.5 introduced the use of the same symbol for matrix
88" multiplication. We now have to exclude the symbol from being
89" highlighted when used in that context. Hence, the check that it's
90" preceded by empty space only (possibly in a docstring/doctest) and
91" followed by decorator name, optional parenthesized list of arguments,
92" and the next line with either def, class, or another decorator.
93syn match pythonDecorator
94 \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\)\zs@\%(\s*\h\%(\w\|\.\)*\%(([^)]*)\)\=\s*\n\s*\%(\.\.\.\s\+\)\=\%(@\s*\h\|\%(def\|class\)\s\+\)\)\@="
95 \ display nextgroup=pythonDecoratorName skipwhite
96
Bram Moolenaar5c736222010-01-06 20:54:52 +010097" A dot must be allowed because of @MyClass.myfunc decorators.
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +020098" It must be preceded by a decorator symbol and on a separate line from
99" a function/class it decorates.
100syn match pythonDecoratorName
101 \ "\%(@\s*\)\@<=\h\%(\w\|\.\)*\%(\%(([^)]*)\)\=\s*\n\)\@="
102 \ contained display nextgroup=pythonFunction skipnl
103
104" The zero-length non-grouping match of def or class before the function
105" name is extremely important in pythonFunction. Without it, everything
106" is interpreted as a function inside the contained environment of
107" doctests.
Bram Moolenaar5c736222010-01-06 20:54:52 +0100108syn match pythonFunction
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +0200109 \ "\%(\%(^\s*\)\%(\%(>>>\|\.\.\.\)\s\+\)\=\%(def\|class\)\s\+\)\@<=\h\w*"
110 \ contained
Bram Moolenaar9c102382006-05-03 21:26:49 +0000111
Bram Moolenaar5c736222010-01-06 20:54:52 +0100112syn match pythonComment "#.*$" contains=pythonTodo,@Spell
113syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
114
115" Triple-quoted strings can contain doctests.
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200116syn region pythonString matchgroup=pythonQuotes
Bram Moolenaar5c736222010-01-06 20:54:52 +0100117 \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
118 \ contains=pythonEscape,@Spell
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200119syn region pythonString matchgroup=pythonTripleQuotes
Bram Moolenaar5c736222010-01-06 20:54:52 +0100120 \ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
121 \ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200122syn region pythonRawString matchgroup=pythonQuotes
Bram Moolenaar5c736222010-01-06 20:54:52 +0100123 \ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
124 \ contains=@Spell
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200125syn region pythonRawString matchgroup=pythonTripleQuotes
Bram Moolenaar5c736222010-01-06 20:54:52 +0100126 \ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
127 \ contains=pythonSpaceError,pythonDoctest,@Spell
128
129syn match pythonEscape +\\[abfnrtv'"\\]+ contained
130syn match pythonEscape "\\\o\{1,3}" contained
131syn match pythonEscape "\\x\x\{2}" contained
132syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
133" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200134syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
Bram Moolenaar5c736222010-01-06 20:54:52 +0100135syn match pythonEscape "\\$"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136
137if exists("python_highlight_all")
Bram Moolenaar5c736222010-01-06 20:54:52 +0100138 if exists("python_no_builtin_highlight")
139 unlet python_no_builtin_highlight
140 endif
141 if exists("python_no_doctest_code_highlight")
142 unlet python_no_doctest_code_highlight
143 endif
144 if exists("python_no_doctest_highlight")
145 unlet python_no_doctest_highlight
146 endif
147 if exists("python_no_exception_highlight")
148 unlet python_no_exception_highlight
149 endif
150 if exists("python_no_number_highlight")
151 unlet python_no_number_highlight
152 endif
153 let python_space_error_highlight = 1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000154endif
155
Bram Moolenaar5c736222010-01-06 20:54:52 +0100156" It is very important to understand all details before changing the
157" regular expressions below or their order.
158" The word boundaries are *not* the floating-point number boundaries
159" because of a possible leading or trailing decimal point.
160" The expressions below ensure that all valid number literals are
161" highlighted, and invalid number literals are not. For example,
162"
163" - a decimal point in '4.' at the end of a line is highlighted,
164" - a second dot in 1.0.0 is not highlighted,
165" - 08 is not highlighted,
166" - 08e0 or 08j are highlighted,
167"
168" and so on, as specified in the 'Python Language Reference'.
Bram Moolenaarf9132812015-07-21 19:19:13 +0200169" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
170" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
Bram Moolenaar5c736222010-01-06 20:54:52 +0100171if !exists("python_no_number_highlight")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172 " numbers (including longs and complex)
Bram Moolenaar5c736222010-01-06 20:54:52 +0100173 syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
174 syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>"
175 syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>"
176 syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>"
177 syn match pythonNumber "\<\d\+[jJ]\>"
178 syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>"
179 syn match pythonNumber
180 \ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
181 syn match pythonNumber
Bram Moolenaarf9132812015-07-21 19:19:13 +0200182 \ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000183endif
184
Bram Moolenaar5c736222010-01-06 20:54:52 +0100185" Group the built-ins in the order in the 'Python Library Reference' for
186" easier comparison.
Bram Moolenaarf9132812015-07-21 19:19:13 +0200187" https://docs.python.org/2/library/constants.html
188" https://docs.python.org/3/library/constants.html
189" http://docs.python.org/2/library/functions.html
190" http://docs.python.org/3/library/functions.html
191" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
192" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
Bram Moolenaar5c736222010-01-06 20:54:52 +0100193" Python built-in functions are in alphabetical order.
194if !exists("python_no_builtin_highlight")
195 " built-in constants
Bram Moolenaarf9132812015-07-21 19:19:13 +0200196 " 'False', 'True', and 'None' are also reserved words in Python 3
Bram Moolenaar5c736222010-01-06 20:54:52 +0100197 syn keyword pythonBuiltin False True None
198 syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
199 " built-in functions
Bram Moolenaarf9132812015-07-21 19:19:13 +0200200 syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
201 syn keyword pythonBuiltin classmethod compile complex delattr dict dir
202 syn keyword pythonBuiltin divmod enumerate eval filter float format
Bram Moolenaar5c736222010-01-06 20:54:52 +0100203 syn keyword pythonBuiltin frozenset getattr globals hasattr hash
204 syn keyword pythonBuiltin help hex id input int isinstance
205 syn keyword pythonBuiltin issubclass iter len list locals map max
Bram Moolenaarf9132812015-07-21 19:19:13 +0200206 syn keyword pythonBuiltin memoryview min next object oct open ord pow
207 syn keyword pythonBuiltin print property range repr reversed round set
Bram Moolenaar5c736222010-01-06 20:54:52 +0100208 syn keyword pythonBuiltin setattr slice sorted staticmethod str
209 syn keyword pythonBuiltin sum super tuple type vars zip __import__
Bram Moolenaarf9132812015-07-21 19:19:13 +0200210 " Python 2 only
211 syn keyword pythonBuiltin basestring cmp execfile file
Bram Moolenaar5c736222010-01-06 20:54:52 +0100212 syn keyword pythonBuiltin long raw_input reduce reload unichr
213 syn keyword pythonBuiltin unicode xrange
Bram Moolenaarf9132812015-07-21 19:19:13 +0200214 " Python 3 only
215 syn keyword pythonBuiltin ascii bytes exec
216 " non-essential built-in functions; Python 2 only
Bram Moolenaar5c736222010-01-06 20:54:52 +0100217 syn keyword pythonBuiltin apply buffer coerce intern
Bram Moolenaar77cdfd12016-03-12 12:57:59 +0100218 " avoid highlighting attributes as builtins
219 syn match pythonAttribute /\.\h\w*/hs=s+1 contains=ALLBUT,pythonBuiltin transparent
Bram Moolenaar071d4272004-06-13 20:20:40 +0000220endif
221
Bram Moolenaar5c736222010-01-06 20:54:52 +0100222" From the 'Python Library Reference' class hierarchy at the bottom.
Bram Moolenaarf9132812015-07-21 19:19:13 +0200223" http://docs.python.org/2/library/exceptions.html
224" http://docs.python.org/3/library/exceptions.html
Bram Moolenaar5c736222010-01-06 20:54:52 +0100225if !exists("python_no_exception_highlight")
Bram Moolenaarf9132812015-07-21 19:19:13 +0200226 " builtin base exceptions (used mostly as base classes for other exceptions)
Bram Moolenaar5c736222010-01-06 20:54:52 +0100227 syn keyword pythonExceptions BaseException Exception
Bram Moolenaarf9132812015-07-21 19:19:13 +0200228 syn keyword pythonExceptions ArithmeticError BufferError
Bram Moolenaar5c736222010-01-06 20:54:52 +0100229 syn keyword pythonExceptions LookupError
Bram Moolenaarf9132812015-07-21 19:19:13 +0200230 " builtin base exceptions removed in Python 3
231 syn keyword pythonExceptions EnvironmentError StandardError
Bram Moolenaar5c736222010-01-06 20:54:52 +0100232 " builtin exceptions (actually raised)
Bram Moolenaarf9132812015-07-21 19:19:13 +0200233 syn keyword pythonExceptions AssertionError AttributeError
Bram Moolenaar5c736222010-01-06 20:54:52 +0100234 syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
Bram Moolenaarf9132812015-07-21 19:19:13 +0200235 syn keyword pythonExceptions ImportError IndentationError
Bram Moolenaar5c736222010-01-06 20:54:52 +0100236 syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
237 syn keyword pythonExceptions MemoryError NameError NotImplementedError
238 syn keyword pythonExceptions OSError OverflowError ReferenceError
239 syn keyword pythonExceptions RuntimeError StopIteration SyntaxError
240 syn keyword pythonExceptions SystemError SystemExit TabError TypeError
241 syn keyword pythonExceptions UnboundLocalError UnicodeError
242 syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
Bram Moolenaarf9132812015-07-21 19:19:13 +0200243 syn keyword pythonExceptions UnicodeTranslateError ValueError
244 syn keyword pythonExceptions ZeroDivisionError
245 " builtin OS exceptions in Python 3
246 syn keyword pythonExceptions BlockingIOError BrokenPipeError
247 syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
248 syn keyword pythonExceptions ConnectionError ConnectionRefusedError
249 syn keyword pythonExceptions ConnectionResetError FileExistsError
250 syn keyword pythonExceptions FileNotFoundError InterruptedError
251 syn keyword pythonExceptions IsADirectoryError NotADirectoryError
252 syn keyword pythonExceptions PermissionError ProcessLookupError
Bram Moolenaarca635012015-09-25 20:34:21 +0200253 syn keyword pythonExceptions RecursionError StopAsyncIteration
Bram Moolenaarf9132812015-07-21 19:19:13 +0200254 syn keyword pythonExceptions TimeoutError
255 " builtin exceptions deprecated/removed in Python 3
256 syn keyword pythonExceptions IOError VMSError WindowsError
Bram Moolenaar5c736222010-01-06 20:54:52 +0100257 " builtin warnings
258 syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
259 syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
260 syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
261 syn keyword pythonExceptions UserWarning Warning
Bram Moolenaarf9132812015-07-21 19:19:13 +0200262 " builtin warnings in Python 3
263 syn keyword pythonExceptions ResourceWarning
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264endif
265
Bram Moolenaar5c736222010-01-06 20:54:52 +0100266if exists("python_space_error_highlight")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000267 " trailing whitespace
Bram Moolenaar5c736222010-01-06 20:54:52 +0100268 syn match pythonSpaceError display excludenl "\s\+$"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269 " mixed tabs and spaces
Bram Moolenaar5c736222010-01-06 20:54:52 +0100270 syn match pythonSpaceError display " \+\t"
271 syn match pythonSpaceError display "\t\+ "
Bram Moolenaar071d4272004-06-13 20:20:40 +0000272endif
273
Bram Moolenaar5c736222010-01-06 20:54:52 +0100274" Do not spell doctests inside strings.
275" Notice that the end of a string, either ''', or """, will end the contained
276" doctest too. Thus, we do *not* need to have it as an end pattern.
277if !exists("python_no_doctest_highlight")
Bram Moolenaar34700a62013-03-07 13:20:54 +0100278 if !exists("python_no_doctest_code_highlight")
Bram Moolenaar5c736222010-01-06 20:54:52 +0100279 syn region pythonDoctest
280 \ start="^\s*>>>\s" end="^\s*$"
281 \ contained contains=ALLBUT,pythonDoctest,@Spell
282 syn region pythonDoctestValue
283 \ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
284 \ contained
285 else
286 syn region pythonDoctest
287 \ start="^\s*>>>" end="^\s*$"
288 \ contained contains=@NoSpell
289 endif
290endif
291
292" Sync at the beginning of class, function, or method definition.
293syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*("
Bram Moolenaar071d4272004-06-13 20:20:40 +0000294
295if version >= 508 || !exists("did_python_syn_inits")
296 if version <= 508
297 let did_python_syn_inits = 1
298 command -nargs=+ HiLink hi link <args>
299 else
300 command -nargs=+ HiLink hi def link <args>
301 endif
302
Bram Moolenaar5c736222010-01-06 20:54:52 +0100303 " The default highlight links. Can be overridden later.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 HiLink pythonStatement Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305 HiLink pythonConditional Conditional
306 HiLink pythonRepeat Repeat
Bram Moolenaar5c736222010-01-06 20:54:52 +0100307 HiLink pythonOperator Operator
308 HiLink pythonException Exception
309 HiLink pythonInclude Include
Bram Moolenaarca635012015-09-25 20:34:21 +0200310 HiLink pythonAsync Statement
Bram Moolenaar5c736222010-01-06 20:54:52 +0100311 HiLink pythonDecorator Define
Bram Moolenaare4a3bcf2016-08-26 19:52:37 +0200312 HiLink pythonDecoratorName Function
Bram Moolenaar5c736222010-01-06 20:54:52 +0100313 HiLink pythonFunction Function
314 HiLink pythonComment Comment
315 HiLink pythonTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000316 HiLink pythonString String
317 HiLink pythonRawString String
Bram Moolenaar541f92d2015-06-19 13:27:23 +0200318 HiLink pythonQuotes String
319 HiLink pythonTripleQuotes pythonQuotes
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320 HiLink pythonEscape Special
Bram Moolenaar5c736222010-01-06 20:54:52 +0100321 if !exists("python_no_number_highlight")
322 HiLink pythonNumber Number
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323 endif
Bram Moolenaar5c736222010-01-06 20:54:52 +0100324 if !exists("python_no_builtin_highlight")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000325 HiLink pythonBuiltin Function
326 endif
Bram Moolenaar5c736222010-01-06 20:54:52 +0100327 if !exists("python_no_exception_highlight")
328 HiLink pythonExceptions Structure
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329 endif
Bram Moolenaar5c736222010-01-06 20:54:52 +0100330 if exists("python_space_error_highlight")
Bram Moolenaar071d4272004-06-13 20:20:40 +0000331 HiLink pythonSpaceError Error
332 endif
Bram Moolenaar5c736222010-01-06 20:54:52 +0100333 if !exists("python_no_doctest_highlight")
334 HiLink pythonDoctest Special
335 HiLink pythonDoctestValue Define
336 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337
338 delcommand HiLink
339endif
340
341let b:current_syntax = "python"
342
Bram Moolenaar00659062010-09-21 22:34:02 +0200343let &cpo = s:cpo_save
344unlet s:cpo_save
345
Bram Moolenaar5c736222010-01-06 20:54:52 +0100346" vim:set sw=2 sts=2 ts=8 noet: