summaryrefslogtreecommitdiffstats
path: root/syntax/rpcgen.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-06 18:54:19 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-06 18:54:19 +0200
commitbc9757916ed09763d96283ee62dbed58bd713a11 (patch)
tree07fbb58e9a4f4cbf5206d89f61e4d570e64d2c1a /syntax/rpcgen.vim
parentc6fa4d2bf5eb5301f4d3f123031cf34839a5508d (diff)
downloadvim-polyglot-bc9757916ed09763d96283ee62dbed58bd713a11.tar.gz
vim-polyglot-bc9757916ed09763d96283ee62dbed58bd713a11.zip
Add all vim filetypes
Diffstat (limited to 'syntax/rpcgen.vim')
-rw-r--r--syntax/rpcgen.vim50
1 files changed, 50 insertions, 0 deletions
diff --git a/syntax/rpcgen.vim b/syntax/rpcgen.vim
new file mode 100644
index 00000000..f15e6564
--- /dev/null
+++ b/syntax/rpcgen.vim
@@ -0,0 +1,50 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpcgen') == -1
+
+" Vim syntax file
+" Language: rpcgen
+" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
+" Last Change: Aug 31, 2016
+" Version: 13
+" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_RPCGEN
+
+if exists("b:current_syntax")
+ finish
+endif
+
+" Read the C syntax to start with
+runtime! syntax/c.vim
+
+syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName
+syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone
+syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr
+syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName
+syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone
+syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment
+syn keyword rpcDecl contained string
+syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1
+syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1
+syn match rpcPassThru "^\s*%.*$"
+
+" Define the default highlighting.
+if !exists("skip_rpcgen_syntax_inits")
+
+ hi def link rpcProgName rpcName
+ hi def link rpcProgram rpcStatement
+ hi def link rpcVersName rpcName
+ hi def link rpcVersion rpcStatement
+
+ hi def link rpcDecl cType
+ hi def link rpcPassThru cComment
+
+ hi def link rpcName Special
+ hi def link rpcProcNmbr Delimiter
+ hi def link rpcProgNmbrErr Error
+ hi def link rpcStatement Statement
+
+endif
+
+let b:current_syntax = "rpcgen"
+
+" vim: ts=8
+
+endif