Mercurial > vim
comparison runtime/syntax/python.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 03fa8a51e9dc |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
34 " All the options above can be switched on together. | 34 " All the options above can be switched on together. |
35 " | 35 " |
36 " let python_highlight_all = 1 | 36 " let python_highlight_all = 1 |
37 " | 37 " |
38 | 38 |
39 " For version 5.x: Clear all syntax items. | 39 " quit when a syntax file was already loaded. |
40 " For version 6.x: Quit when a syntax file was already loaded. | 40 if exists("b:current_syntax") |
41 if version < 600 | |
42 syntax clear | |
43 elseif exists("b:current_syntax") | |
44 finish | 41 finish |
45 endif | 42 endif |
46 | 43 |
47 " We need nocompatible mode in order to continue lines with backslashes. | 44 " We need nocompatible mode in order to continue lines with backslashes. |
48 " Original setting will be restored. | 45 " Original setting will be restored. |
290 endif | 287 endif |
291 | 288 |
292 " Sync at the beginning of class, function, or method definition. | 289 " Sync at the beginning of class, function, or method definition. |
293 syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" | 290 syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" |
294 | 291 |
295 if version >= 508 || !exists("did_python_syn_inits") | 292 command -nargs=+ HiLink hi def link <args> |
296 if version <= 508 | 293 |
297 let did_python_syn_inits = 1 | 294 " The default highlight links. Can be overridden later. |
298 command -nargs=+ HiLink hi link <args> | 295 HiLink pythonStatement Statement |
299 else | 296 HiLink pythonConditional Conditional |
300 command -nargs=+ HiLink hi def link <args> | 297 HiLink pythonRepeat Repeat |
301 endif | 298 HiLink pythonOperator Operator |
302 | 299 HiLink pythonException Exception |
303 " The default highlight links. Can be overridden later. | 300 HiLink pythonInclude Include |
304 HiLink pythonStatement Statement | 301 HiLink pythonAsync Statement |
305 HiLink pythonConditional Conditional | 302 HiLink pythonDecorator Define |
306 HiLink pythonRepeat Repeat | 303 HiLink pythonDecoratorName Function |
307 HiLink pythonOperator Operator | 304 HiLink pythonFunction Function |
308 HiLink pythonException Exception | 305 HiLink pythonComment Comment |
309 HiLink pythonInclude Include | 306 HiLink pythonTodo Todo |
310 HiLink pythonAsync Statement | 307 HiLink pythonString String |
311 HiLink pythonDecorator Define | 308 HiLink pythonRawString String |
312 HiLink pythonDecoratorName Function | 309 HiLink pythonQuotes String |
313 HiLink pythonFunction Function | 310 HiLink pythonTripleQuotes pythonQuotes |
314 HiLink pythonComment Comment | 311 HiLink pythonEscape Special |
315 HiLink pythonTodo Todo | 312 if !exists("python_no_number_highlight") |
316 HiLink pythonString String | 313 HiLink pythonNumber Number |
317 HiLink pythonRawString String | 314 endif |
318 HiLink pythonQuotes String | 315 if !exists("python_no_builtin_highlight") |
319 HiLink pythonTripleQuotes pythonQuotes | 316 HiLink pythonBuiltin Function |
320 HiLink pythonEscape Special | 317 endif |
321 if !exists("python_no_number_highlight") | 318 if !exists("python_no_exception_highlight") |
322 HiLink pythonNumber Number | 319 HiLink pythonExceptions Structure |
323 endif | 320 endif |
324 if !exists("python_no_builtin_highlight") | 321 if exists("python_space_error_highlight") |
325 HiLink pythonBuiltin Function | 322 HiLink pythonSpaceError Error |
326 endif | 323 endif |
327 if !exists("python_no_exception_highlight") | 324 if !exists("python_no_doctest_highlight") |
328 HiLink pythonExceptions Structure | 325 HiLink pythonDoctest Special |
329 endif | 326 HiLink pythonDoctestValue Define |
330 if exists("python_space_error_highlight") | 327 endif |
331 HiLink pythonSpaceError Error | 328 |
332 endif | 329 delcommand HiLink |
333 if !exists("python_no_doctest_highlight") | |
334 HiLink pythonDoctest Special | |
335 HiLink pythonDoctestValue Define | |
336 endif | |
337 | |
338 delcommand HiLink | |
339 endif | |
340 | 330 |
341 let b:current_syntax = "python" | 331 let b:current_syntax = "python" |
342 | 332 |
343 let &cpo = s:cpo_save | 333 let &cpo = s:cpo_save |
344 unlet s:cpo_save | 334 unlet s:cpo_save |