path: root/data/edje/vim/syntax/embryo.vim
diff options
authorTom Hacohen <>2014-08-04 13:53:54 +0100
committerTom Hacohen <>2014-08-04 13:54:07 +0100
commit3bf0425af06a5f4baac2f940e020a8c95fc498e4 (patch)
treeb6cefa5f8680ab806f0f846215002f7b8816e1ae /data/edje/vim/syntax/embryo.vim
parent0e4fd1b4d1e6e9d37015a4e70d8a9f0e66d5c50a (diff)
Edje vim: Migrate vim files to the editors repo.
Diffstat (limited to '')
1 files changed, 0 insertions, 195 deletions
diff --git a/data/edje/vim/syntax/embryo.vim b/data/edje/vim/syntax/embryo.vim
deleted file mode 100644
index 11175d893f..0000000000
--- a/data/edje/vim/syntax/embryo.vim
+++ /dev/null
@@ -1,195 +0,0 @@
1" Vim syntax file
2" Language: Embryo
3" Maintainer: Viktor Kojouharov
4" Last Change: 2006 10 06
6" For version 5.x: Clear all syntax items
7" For version 6.x: Quit when a syntax file was already loaded
8if version < 600
9 syntax clear
10elseif exists("b:current_syntax")
11 finish
14" A bunch of useful keywords
15syn keyword embryoConditional if else switch
16syn keyword embryoRepeat while for do in
17syn keyword embryoBranch break continue
18syn keyword embryoOperator new
19syn keyword embryoType Float State_Param Msg_Type enum
20syn keyword embryoStatement return with native stock forward
21syn keyword embryoLabel case default
22syn keyword embryoReserved public
23syn keyword embryoEdjeKey PART PROGRAM
25syn keyword embryoTodo contained TODO FIXME XXX
27" embryoCommentGroup allows adding matches for special things in comments
28syn cluster embryoCommentGroup contains=embryoTodo
30" String and Character constants
31" Highlight special characters (those which have a backslash) differently
32syn match embryoSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
33syn region embryoString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=embryoSpecial
34syn match embryoFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
35syn match embryoFormat display "%%" contained
36syn region embryoString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat
38syn match embryoCharacter "L\='[^\\]'"
39syn match embryoCharacter "L'[^']*'" contains=embryoSpecial
40syn match embryoSpecialError "L\='\\[^'\"?\\abfnrtv]'"
41syn match embryoSpecialCharacter "L\='\\['\"?\\abfnrtv]'"
42syn match embryoSpecialCharacter display "L\='\\\o\{1,3}'"
43syn match embryoSpecialCharacter display "'\\x\x\{1,2}'"
44syn match embryoSpecialCharacter display "L'\\x\x\+'"
46"when wanted, highlight trailing white space
47if exists("embryo_space_errors")
48 if !exists("embryo_no_trail_space_error")
49 syn match embryoSpaceError display excludenl "\s\+$"
50 endif
51 if !exists("embryo_no_tab_space_error")
52 syn match embryoSpaceError display " \+\t"me=e-1
53 endif
56"catch errors caused by wrong parenthesis and brackets
57syn cluster embryoParenGroup contains=embryoParenError,embryoIncluded,embryoSpecial,embryoCommentSkip,embryoCommentString,embryoComment2String,@embryoCommentGroup,embryoCommentStartErr,embryoUserCont,embryoUserLabel,embryoBitField,embryoCommentSkip,embryoOctalZero,embryoFormat,embryoNumber,embryoFloat,embryoOctal,embryoOctalError,embryoNumbersCom
58if exists("embryo_no_bracket_error")
59 syn region embryoParen transparent start='(' end=')' contains=ALLBUT,@embryoParenGroup
60 syn match embryoParenError display ")"
61 syn match embryoErrInParen display contained "[{}]"
63 syn region embryoParen transparent start='(' end=')' contains=ALLBUT,@embryoParenGroup,embryoErrInBracket
64 syn match embryoParenError display "[\])]"
65 syn match embryoErrInParen display contained "[\]{}]"
66 syn region embryoBracket transparent start='\[' end=']' contains=ALLBUT,@embryoParenGroup,embryoErrInParen
67 syn match embryoErrInBracket display contained "[);{}]"
70syn region embryoBrace start='{' end='}' transparent
71"integer number, or floating point number without a dot and with "f".
72syn case ignore
73syn match embryoNumbers display transparent "\<\d\|\.\d" contains=embryoNumber,embryoFloat,embryoOctalError,embryoOctal
74" Same, but without octal error (for comments)
75syn match embryoNumbersCom display contained transparent "\<\d\|\.\d" contains=embryoNumber,embryoFloat,embryoOctal
76syn match embryoNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
77"hex number
78syn match embryoNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
79" Flag the first zero of an octal number as something special
80syn match embryoOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=embryoOctalZero
81syn match embryoOctalZero display contained "\<0"
82syn match embryoFloat display contained "\d\+f"
83"floating point number, with dot, optional exponent
84syn match embryoFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
85"floating point number, starting with a dot, optional exponent
86syn match embryoFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
87"floating point number, without dot, with exponent
88syn match embryoFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
89" flag an octal number with wrong digits
90syn match embryoOctalError display contained "0\o*[89]\d*"
91syn case match
93if exists("embryo_comment_strings")
94 " A comment can contain embryoString, embryoCharacter and embryoNumber.
95 " But a "*/" inside a embryoString in a embryoComment DOES end the comment! So we
96 " need to use a special type of embryoString: embryoCommentString, which also ends
97 " on "*/", and sees a "*" at the start of the line as comment again.
98 " Unfortunately this doesn't very well work for // type of comments :-(
99 syntax match embryoCommentSkip contained "^\s*\*\($\|\s\+\)"
100 syntax region embryoCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=embryoSpecial,embryoCommentSkip
101 syntax region embryoComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=embryoSpecial
102 syntax region embryoCommentL start="//" skip="\\$" end="$" keepend contains=@embryoCommentGroup,embryoComment2String,embryoCharacter,embryoNumbersCom,embryoSpaceError
103 syntax region embryoComment matchgroup=embryoCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@embryoCommentGroup,embryoCommentStartErr,embryoCommentString,embryoCharacter,embryoNumbersCom,embryoSpaceError
105 syn region embryoCommentL start="//" skip="\\$" end="$" keepend contains=@embryoCommentGroup,embryoSpaceError
106 syn region embryoComment matchgroup=embryoCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@embryoCommentGroup,embryoCommentStartErr,embryoSpaceError
108" keep a // comment separately, it terminates a preproc. conditional
109syntax match embryoCommentError display "\*/"
110syntax match embryoCommentStartErr display "/\*"me=e-1 contained
112syn region embryoPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=embryoComment,embryoCharacter,embryoParenError,embryoNumbers,embryoCommentError,embryoSpaceError
113syn match embryoPreCondit display "^\s*#\s*\(else\|endif\)\>"
114syn region embryoIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
115syn match embryoIncluded display contained "<[^>]*>"
116syn match embryoInclude display "^\s*#\s*include\>\s*["<]" contains=embryoIncluded
117syn cluster embryoPreProcGroup contains=embryoPreCondit,embryoIncluded,embryoInclude,embryoDefine,embryoErrInParen,embryoErrInBracket,embryoCommentSkip,embryoCommentString,embryoComment2String,@embryoCommentGroup,embryoCommentStartErr,embryoParen,embryoBracket,embryoMulti,embryoUserLabel
118syn cluster embryoAlphaNum contains=embryoSpecial,embryoOctalZero,embryoFormat,embryoNumber,embryoFloat,embryoOctal,embryoOctalError,embryoNumbersCom,embryoString
119syn region embryoDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@embryoPreProcGroup
120syn region embryoPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@embryoPreProcGroup
122syn match embryoUserLabel display "\I\i*" contained
124syn match embryoFunctionName "\h\w*\s*\%((\@=\)"
126if exists("embryo_minlines")
127 let b:embryo_minlines = embryo_minlines
129 let b:embryo_minlines = 50 " #if 0 constructs can be long
131exec "syn sync ccomment embryoComment minlines=" . b:embryo_minlines
132"syn sync fromstart
134" Define the default highlighting.
135" For version 5.7 and earlier: only when not done already
136" For version 5.8 and later: only when an item doesn't have highlighting yet
137if version >= 508 || !exists("did_embryo_syn_inits")
138 if version < 508
139 let did_embryo_syn_inits = 1
140 command -nargs=+ HiLink hi link <args>
141 else
142 command -nargs=+ HiLink hi def link <args>
143 endif
145 HiLink embryoFormat embryoSpecial
146 HiLink embryoCommentL embryoComment
147 HiLink embryoCommentStart embryoComment
148 HiLink embryoLabel Label
149 HiLink embryoUserLabel Label
150 HiLink embryoConditional Conditional
151 HiLink embryoRepeat Repeat
152 HiLink embryoBranch Conditional
153 HiLink embryoReserved Keyword
154 HiLink embryoCharacter Character
155 HiLink embryoSpecialCharacter cSpecial
156 HiLink embryoNumber Number
157 HiLink embryoOctal Number
158 HiLink embryoOctalZero PreProc " link this to Error if you want
159 HiLink embryoFloat Float
160 HiLink embryoOctalError embryoError
161 HiLink embryoParenError embryoError
162 HiLink embryoErrInParen embryoError
163 HiLink embryoErrInBracket embryoError
164 HiLink embryoCommentError embryoError
165 HiLink embryoCommentStartErr embryoError
166 HiLink embryoSpaceError embryoError
167 HiLink embryoSpecialError embryoError
168 HiLink embryoOperator Operator
169 HiLink embryoStructure Structure
170 HiLink embryoEdjeKey Structure
171 HiLink embryoStorageClass StorageClass
172 HiLink embryoInclude Include
173 HiLink embryoPreProc PreProc
174 HiLink embryoDefine Macro
175 HiLink embryoIncluded embryoString
176 HiLink embryoError Error
177 HiLink embryoStatement Statement
178 HiLink embryoPreCondit PreCondit
179 HiLink embryoType Type
180 HiLink embryoConstant Constant
181 HiLink embryoCommentString embryoString
182 HiLink embryoComment2String embryoString
183 HiLink embryoCommentSkip embryoComment
184 HiLink embryoString String
185 HiLink embryoComment Comment
186 HiLink embryoSpecial SpecialChar
187 HiLink embryoTodo Todo
188 HiLink embryoFunctionName Function
190 delcommand HiLink
193let b:current_syntax = "embryo"
195" vim: ts=8