neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

pyrex.vim (1663B)


      1 " Vim syntax file
      2 " Language:	Pyrex
      3 " Maintainer:	Marco Barisione <marco.bari@people.it>
      4 " URL:		http://marcobari.altervista.org/pyrex_vim.html
      5 " Last Change:	2009 Nov 09
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9  finish
     10 endif
     11 
     12 " Read the Python syntax to start with
     13 runtime! syntax/python.vim
     14 unlet b:current_syntax
     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
     21 syn keyword pyrexInclude	include cimport
     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
     31 syn clear   pythonInclude
     32 syn keyword pythonInclude     import
     33 syn match   pythonInclude     "from"
     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
     40 hi def link pyrexStatement		Statement
     41 hi def link pyrexType		Type
     42 hi def link pyrexStructure		Structure
     43 hi def link pyrexInclude		PreCondit
     44 hi def link pyrexAccess		pyrexStatement
     45 if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins")
     46 hi def link pyrexBuiltin	Function
     47 endif
     48 hi def link pyrexForFrom		Statement
     49 
     50 
     51 let b:current_syntax = "pyrex"