annotate runtime/syntax/pyrex.vim @ 10011:306f72cd32c2 v7.4.2278

commit https://github.com/vim/vim/commit/4427db9bb2f4b4587559eac18cc7ba10c52c6e8b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 28 14:39:44 2016 +0200 patch 7.4.2278 Problem: New users have no idea of the 'scrolloff' option. Solution: Set 'scrolloff' in defaults.vim.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Aug 2016 14:45:05 +0200
parents 7bc41231fbc7
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Pyrex
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Marco Barisione <marco.bari@people.it>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://marcobari.altervista.org/pyrex_vim.html
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
5 " Last Change: 2009 Nov 09
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Read the Python syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 so <sfile>:p:h/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 runtime! syntax/python.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 unlet b:current_syntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Pyrex extentions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword pyrexStatement cdef typedef ctypedef sizeof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword pyrexType int long short float double char object void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword pyrexType signed unsigned
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword pyrexStructure struct union enum
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
28 syn keyword pyrexInclude include cimport
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword pyrexAccess public private property readonly extern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " If someome wants Python's built-ins highlighted probably he
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " also wants Pyrex's built-ins highlighted
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword pyrexBuiltin NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " This deletes "from" from the keywords and re-adds it as a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 " match with lower priority than pyrexForFrom
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
38 syn clear pythonInclude
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
39 syn keyword pythonInclude import
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
40 syn match pythonInclude "from"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " With "for[^:]*\zsfrom" VIM does not match "for" anymore, so
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " I used the slower "\@<=" form
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match pyrexForFrom "\(for[^:]*\)\@<=from"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Default highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 if version >= 508 || !exists("did_pyrex_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 let did_pyrex_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink pyrexStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink pyrexType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink pyrexStructure Structure
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
57 HiLink pyrexInclude PreCondit
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink pyrexAccess pyrexStatement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink pyrexBuiltin Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink pyrexForFrom Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 let b:current_syntax = "pyrex"