Mercurial > vim
annotate runtime/syntax/pyrex.vim @ 31355:45a03dd92f28 v9.0.1011
patch 9.0.1011: ml_get error when using screenpos()
Commit: https://github.com/vim/vim/commit/99d19438cabaf13074229d9a32e3a4af9ce98744
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Dec 5 16:23:24 2022 +0000
patch 9.0.1011: ml_get error when using screenpos()
Problem: ml_get error when using screenpos().
Solution: Give an error for the line number. (closes https://github.com/vim/vim/issues/11661)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 05 Dec 2022 17:30:06 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Pyrex | |
3 " Maintainer: Marco Barisione <marco.bari@people.it> | |
4 " URL: http://marcobari.altervista.org/pyrex_vim.html | |
2034 | 5 " Last Change: 2009 Nov 09 |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
12 " Read the Python syntax to start with | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
13 runtime! syntax/python.vim |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
14 unlet b:current_syntax |
7 | 15 |
16 " Pyrex extentions | |
17 syn keyword pyrexStatement cdef typedef ctypedef sizeof | |
18 syn keyword pyrexType int long short float double char object void | |
19 syn keyword pyrexType signed unsigned | |
20 syn keyword pyrexStructure struct union enum | |
2034 | 21 syn keyword pyrexInclude include cimport |
7 | 22 syn keyword pyrexAccess public private property readonly extern |
23 " If someome wants Python's built-ins highlighted probably he | |
24 " also wants Pyrex's built-ins highlighted | |
25 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") | |
26 syn keyword pyrexBuiltin NULL | |
27 endif | |
28 | |
29 " This deletes "from" from the keywords and re-adds it as a | |
30 " match with lower priority than pyrexForFrom | |
2034 | 31 syn clear pythonInclude |
32 syn keyword pythonInclude import | |
33 syn match pythonInclude "from" | |
7 | 34 |
35 " With "for[^:]*\zsfrom" VIM does not match "for" anymore, so | |
36 " I used the slower "\@<=" form | |
37 syn match pyrexForFrom "\(for[^:]*\)\@<=from" | |
38 | |
39 " Default highlighting | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
40 hi def link pyrexStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
41 hi def link pyrexType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
42 hi def link pyrexStructure Structure |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
43 hi def link pyrexInclude PreCondit |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
44 hi def link pyrexAccess pyrexStatement |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
45 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
46 hi def link pyrexBuiltin Function |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2034
diff
changeset
|
47 endif |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
48 hi def link pyrexForFrom Statement |
7 | 49 |
50 | |
51 let b:current_syntax = "pyrex" |