Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9efe01d

Browse files
committed
Initial commit
0 parents  commit 9efe01d

4 files changed

Lines changed: 99 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

doc/xc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This the a vim plugin to add syntax highlighting support for XMOS XC specific keywords and operators.

plugin/xc.vim

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
" Vim syntax file
2+
" Language: xc (XMOS C)
3+
" Maintainer: Fred Barnes <[email protected]>
4+
" Last Change: 01/11/2008
5+
6+
if version < 600
7+
syntax clear
8+
elseif exists("b:current_syntax")
9+
finish
10+
endif
11+
12+
" Read C syntax to start with
13+
if version < 600
14+
so <sfile>:p:h/c.vim
15+
else
16+
runtime! syntax/c.vim
17+
unlet b:current_syntax
18+
endif
19+
20+
setlocal conceallevel=2
21+
setlocal concealcursor=nv
22+
23+
syn clear cUserCont
24+
syn match cppCustomConcealNot "!" conceal cchar=¬ contains=cppCustomConceal
25+
syn match cppCustomConceal "<:" conceal cchar=
26+
syn match cppCustomConceal ":>" conceal cchar=
27+
syn match cppCustomConceal "->" conceal cchar=
28+
syn match cppCustomConceal "=>" conceal cchar=
29+
syn match cppCustomConceal "==" conceal cchar=
30+
syn match cppCustomConceal "\[\[" conceal cchar=
31+
syn match cppCustomConceal "\]\]" conceal cchar=
32+
syn match cppCustomConceal "!=" conceal cchar=≠"contains=cppCustomConcealNot
33+
syn match cppCustomConceal "<=" conceal cchar=
34+
syn match cppCustomConceal ">=" conceal cchar=
35+
syn match cppCustomConceal "<<" conceal cchar=
36+
syn match cppCustomConceal ">>" conceal cchar=
37+
syn match cppCustomConceal "&&" conceal cchar=
38+
syn match cppCustomConceal "||" conceal cchar=
39+
40+
syn match xcCustomConst "XS1_[A-Z_0-9]\+"
41+
syn match binaryNumber "0b[01]\+"
42+
43+
44+
hi def link cppCustomConceal Operator
45+
hi def link cppCustomConcealNot Operator
46+
hi def link xcCustomConst Constant
47+
hi Conceal ctermbg=NONE ctermfg=NONE
48+
hi def link binaryNumber Number
49+
50+
" XC extensions
51+
syn keyword xcReserved auto else return union
52+
syn keyword xcReserved break enum short unsigned
53+
syn keyword xcReserved case extern signed void
54+
syn keyword xcReserved char for sizeof volatile
55+
syn keyword xcReserved const if static while
56+
syn keyword xcReserved continue int struct
57+
syn keyword xcReserved default long switch
58+
syn keyword xcReserved do register typedef interface server client
59+
60+
syn keyword xcType buffered par timer
61+
syn keyword xcType chan inline port transaction streaming
62+
syn keyword xcType chanend master select when
63+
syn keyword xcType clock slave
64+
65+
syn keyword xcPortType in out
66+
67+
syn keyword xcFuture accept claim goto proc
68+
syn keyword xcFuture asm double module restrict
69+
syn keyword xcFuture assert float on
70+
71+
syn keyword Macro combine combinable
72+
73+
syn keyword Type timerafter pinseq pinsneq
74+
75+
"syn match xcIOOper "<:\|:>\|@\|>>"
76+
77+
if version >= 508 || !exists("did_xc_syntax_inits")
78+
if version < 508
79+
let did_xc_syntax_inits = 1
80+
command -nargs=+ HiLink hi link <args>
81+
else
82+
command -nargs=+ HiLink hi def link <args>
83+
endif
84+
HiLink xcReserved Type
85+
HiLink xcType Type
86+
HiLink xcPortType Type
87+
HiLink xcFuture Keyword
88+
HiLink xcIOOper Operator
89+
delcommand HiLink
90+
endif
91+
92+
let b:current_syntax = "xc"
93+
94+
" vim: ts=8

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# XC.VIM
2+
3+
This the a vim plugin to add syntax highlighting support for XMOS XC specific keywords and operators.

0 commit comments

Comments
 (0)