summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-08-04 13:53:54 +0100
committerTom Hacohen <tom@stosb.com>2014-08-04 13:54:07 +0100
commit3bf0425af06a5f4baac2f940e020a8c95fc498e4 (patch)
treeb6cefa5f8680ab806f0f846215002f7b8816e1ae /data
parent0e4fd1b4d1e6e9d37015a4e70d8a9f0e66d5c50a (diff)
Edje vim: Migrate vim files to the editors repo.
Diffstat (limited to 'data')
-rw-r--r--data/edje/edc.vim375
-rw-r--r--data/edje/vim/autoload/edccomplete.vim892
-rw-r--r--data/edje/vim/ftdetect/edc.vim3
-rw-r--r--data/edje/vim/ftplugin/edc.vim23
-rw-r--r--data/edje/vim/indent/edc.vim83
-rw-r--r--data/edje/vim/plugin-info.txt8
-rw-r--r--data/edje/vim/snippets/edc.snippets99
-rw-r--r--data/edje/vim/syntax/edc.vim246
-rw-r--r--data/edje/vim/syntax/embryo.vim195
9 files changed, 0 insertions, 1924 deletions
diff --git a/data/edje/edc.vim b/data/edje/edc.vim
deleted file mode 100644
index f8f31d0..0000000
--- a/data/edje/edc.vim
+++ /dev/null
@@ -1,375 +0,0 @@
1" Vim syntax file
2" Language: EDC
3" Maintainer: billiob <billiob@gmail.com>
4" Last Change: 05/08/2011
5
6" For version 5.x: Clear all syntax items
7" For version 6.x: Quit when a syntax file was already loaded
8"
9" Usage:
10" 1) Copy this file to $HOME/.vim/syntax/
11" 2) Paste the following line to your $HOME/.vimrc file to load the syntax
12" automatically:
13"
14" au BufNewFile,BufRead *.edc set syntax=edc
15"
16if version < 600
17 syntax clear
18elseif exists("b:current_syntax")
19 finish
20endif
21
22" A bunch of useful C keywords
23syn keyword cStructure images data fonts collections group externals
24syn keyword cStructure part parts dragable description rel1 rel2
25syn keyword cStatement text image font fill origin size tag
26syn keyword cStructure programs program script script_only lua_script lua_script_only styles style base
27syn keyword cStructure spectra spectrum box set
28syn keyword cStructure physics movement_freedom faces face world
29syn match cType "+ + +;" contained
30
31syn keyword cLabel item name min max type effect file
32syn keyword cLabel mouse_events repeat_events clip_to
33syn keyword cLabel color_class text_class x y confine
34syn keyword cLabel state visible align step aspect aspect_preference fixed
35syn keyword cLabel relative offset to to_x to_y normal tween
36syn keyword cLabel border color color2 color3 font size fit align
37syn keyword cLabel signal source action transition in target after
38syn keyword cLabel text smooth inherit scale middle ignore_flags
39syn keyword cLabel alias events entry_mode select_mode multiline
40syn keyword cLabel source1 source2 source3 source4 source5 source6
41syn keyword cLabel text_source transitions layout padding
42syn keyword cLabel size_w size_h size_max_w size_max_h size_min_w size_min_w
43syn keyword cLabel spread scale_hint elipsis ellipsis pointer_mode prefer
44syn keyword cLabel precise_is_inside use_alternate_font_metrics options
45syn keyword cLabel aspect_mode position span angle repch api
46syn keyword cLabel external params size_range border_scale minmul
47syn keyword cLabel insert_before insert_after
48
49syn keyword cLabel mass density material restitution friction
50syn keyword cLabel ignore_part_pos light_on damping sleep
51syn keyword cLabel physics_body hardness linear angular
52syn keyword cLabel backface_cull gravity rate z depth
53syn keyword cLabel sounds sample
54
55syn keyword cConditional if else switch
56syn keyword cRepeat while for do
57syn keyword cConstant COMP RAW LOSSY USER
58syn keyword cConstant RECT TEXT IMAGE SWALLOW TEXTBLOCK GRADIENT SPACER
59syn keyword cConstant GROUP BOX TABLE EXTERNAL ITEM
60syn keyword cConstant SOLID AUTOGRAB NOGRAB
61syn keyword cConstant NONE PLAIN OUTLINE SOFT_OUTLINE SHADOW
62syn keyword cConstant SOFT_SHADOW OUTLINE_SHADOW OUTLINE_SOFT_SHADOW
63syn keyword cConstant FAR_SOFT_SHADOW FAR_SHADOW GLOW
64syn keyword cConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
65syn keyword cConstant TOP_LEFT TOP TOP_RIGHT RIGHT
66syn keyword cConstant STATE_SET ACTION_STOP SIGNAL_EMIT
67syn keyword cConstant SCRIPT LUA_SCRIPT
68syn keyword cConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
69syn keyword cConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE SPRING
70syn keyword cConstant VERTICAL HORIZONTAL ON_HOLD BOTH EDITABLE
71syn keyword cConstatn DEFAULT EXPLICIT
72syn keyword cConstant CURRENT
73syn keyword cConstant FOCUS_SET "default" NEITHER
74syn keyword cConstant DYNAMIC STATIC PASSWORD
75
76syn keyword cConstant RIGID_BOX RIGID_SPHERE SOFT_BOX SOFT_SPHERE
77syn keyword cConstant RIGID_CYLINDER SOFT_CYLINDER
78syn keyword cConstant CLOTH BOUNDARY_TOP BOUNDARY_BOTTOM BOUNDARY_LEFT
79syn keyword cConstant BOUNDARY_RIGHT BOUNDARY_FRONT BOUNDARY_BACK
80syn keyword cConstant PHYSICS_IMPULSE PHYSICS_TORQUE_IMPULSE
81syn keyword cConstant PHYSICS_FORCE PHYSICS_TORQUE PHYSICS_STOP
82syn keyword cConstant PHYSICS_FORCES_CLEAR PHYSICS_VEL_SET
83syn keyword cConstant PHYSICS_ANG_VEL_SET BOX_MIDDLE_FRONT
84syn keyword cConstant BOX_MIDDLE_BACK BOX_FRONT BOX_BACK BOX_LEFT
85syn keyword cConstant BOX_RIGHT BOX_TOP BOX_BOTTOM
86syn keyword cConstant CYLINDER_MIDDLE_FRONT CYLINDER_MIDDLE_BACK
87syn keyword cConstant CYLINDER_FRONT CYLINDER_BACK CYLINDER_CURVED
88syn keyword cConstant CLOTH_FRONT CLOTH_BACK SPHERE_FRONT SPHERE_BACK
89syn keyword cConstant PLAY_SAMPLE
90
91syn keyword cTodo contained TODO FIXME XXX
92
93" cCommentGroup allows adding matches for special things in comments
94syn cluster cCommentGroup contains=cTodo
95
96" String and Character constants
97" Highlight special characters (those which have a backslash) differently
98syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
99if !exists("c_no_utf")
100 syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)"
101endif
102if exists("c_no_cformat")
103 syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial
104 " cCppString: same as cString, but ends at end of line
105 syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial
106else
107 syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
108 syn match cFormat display "%%" contained
109 syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat
110 " cCppString: same as cString, but ends at end of line
111 syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat
112endif
113
114syn match cCharacter "L\='[^\\]'"
115syn match cCharacter "L'[^']*'" contains=cSpecial
116if exists("c_gnu")
117 syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'"
118 syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'"
119else
120 syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'"
121 syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'"
122endif
123syn match cSpecialCharacter display "L\='\\\o\{1,3}'"
124syn match cSpecialCharacter display "'\\x\x\{1,2}'"
125syn match cSpecialCharacter display "L'\\x\x\+'"
126
127"when wanted, highlight trailing white space
128if exists("c_space_errors")
129 if !exists("c_no_trail_space_error")
130 syn match cSpaceError display excludenl "\s\+$"
131 endif
132 if !exists("c_no_tab_space_error")
133 syn match cSpaceError display " \+\t"me=e-1
134 endif
135endif
136
137"catch errors caused by wrong parenthesis and brackets
138syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cCommentSkip,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom
139if exists("c_no_bracket_error")
140 syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString
141 " cCppParen: same as cParen but ends at end-of-line; used in cDefine
142 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString
143 syn match cParenError display ")"
144 syn match cErrInParen display contained "[{}]"
145else
146 syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString
147 " cCppParen: same as cParen but ends at end-of-line; used in cDefine
148 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString
149 syn match cParenError display "[\])]"
150 syn match cErrInParen display contained "[\]{}]"
151 syn region cBracket transparent start='\[' end=']' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString
152 " cCppBracket: same as cParen but ends at end-of-line; used in cDefine
153 syn region cCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString
154 syn match cErrInBracket display contained "[);{}]"
155endif
156
157"integer number, or floating point number without a dot and with "f".
158syn case ignore
159syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal
160" Same, but without octal error (for comments)
161syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal
162syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
163"hex number
164syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
165" Flag the first zero of an octal number as something special
166syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero
167syn match cOctalZero display contained "\<0"
168syn match cFloat display contained "\d\+f"
169"floating point number, with dot, optional exponent
170syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
171"floating point number, starting with a dot, optional exponent
172syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
173"floating point number, without dot, with exponent
174syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
175" flag an octal number with wrong digits
176syn match cOctalError display contained "0\o*[89]\d*"
177syn case match
178
179if exists("c_comment_strings")
180 " A comment can contain cString, cCharacter and cNumber.
181 " But a "*/" inside a cString in a cComment DOES end the comment! So we
182 " need to use a special type of cString: cCommentString, which also ends on
183 " "*/", and sees a "*" at the start of the line as comment again.
184 " Unfortunately this doesn't very well work for // type of comments :-(
185 syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)"
186 syntax region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
187 syntax region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
188 syntax region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError
189 syntax region cComment matchgroup=cCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError
190else
191 syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError
192 syn region cComment matchgroup=cCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError
193endif
194" keep a // comment separately, it terminates a preproc. conditional
195syntax match cCommentError display "\*/"
196syntax match cCommentStartError display "/\*"me=e-1 contained
197
198syn keyword cOperator sizeof
199if exists("c_gnu")
200 syn keyword cStatement __asm__
201 syn keyword cOperator typeof __real__ __imag__
202endif
203syn keyword cType int long short char void
204syn keyword cType signed unsigned float double
205if !exists("c_no_ansi") || exists("c_ansi_typedefs")
206 syn keyword cType size_t wchar_t ptrdiff_t sig_atomic_t fpos_t
207 syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t
208 syn keyword cType mbstate_t wctrans_t wint_t wctype_t
209endif
210if !exists("c_no_c99") " ISO C99
211 syn keyword cType bool complex
212 syn keyword cType int8_t int16_t int32_t int64_t
213 syn keyword cType uint8_t uint16_t uint32_t uint64_t
214 syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t
215 syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t
216 syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t
217 syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t
218 syn keyword cType intptr_t uintptr_t
219 syn keyword cType intmax_t uintmax_t
220endif
221if exists("c_gnu")
222 syn keyword cType __label__ __complex__ __volatile__
223endif
224
225syn keyword cStructure struct union enum typedef
226syn keyword cStorageClass static register auto volatile extern const
227if exists("c_gnu")
228 syn keyword cStorageClass inline __attribute__
229endif
230
231if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
232 if exists("c_gnu")
233 syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__
234 endif
235 syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__
236 syn keyword cConstant __STDC_VERSION__
237 syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX
238 syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
239 syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN
240 syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX
241 syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN
242 syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX
243 syn keyword cConstant FLT_RADIX FLT_ROUNDS
244 syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON
245 syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON
246 syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON
247 syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP
248 syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP
249 syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP
250 syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP
251 syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
252 syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP
253 syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL
254 syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
255 syn keyword cConstant LC_NUMERIC LC_TIME
256 syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN
257 syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
258 " Add POSIX signals as well...
259 syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP
260 syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
261 syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU
262 syn keyword cConstant SIGUSR1 SIGUSR2
263 syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF
264 syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam
265 syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
266 syn keyword cConstant TMP_MAX stderr stdin stdout
267 syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
268 " Add POSIX errors as well
269 syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
270 syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
271 syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR
272 syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV
273 syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS
274 syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM
275 syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV
276 " math.h
277 syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
278 syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
279endif
280if !exists("c_no_c99") " ISO C99
281 syn keyword cConstant true false
282endif
283
284syn region cPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError
285syn match cPreCondit display "^\s*#\s*\(else\|endif\)\>"
286if !exists("c_no_if0")
287 syn region cCppOut start="^\s*#\s*if\s\+0\+\>" end=".\|$" contains=cCppOut2
288 syn region cCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip
289 syn region cCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=cSpaceError,cCppSkip
290endif
291syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
292syn match cIncluded display contained "<[^>]*>"
293syn match cInclude display "^\s*#\s*include\>\s*["<]" contains=cIncluded
294"syn match cLineSkip "\\$"
295syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti
296syn region cDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@cPreProcGroup
297syn region cPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup
298
299syn match cUserLabel display "\I\i*" contained
300
301
302
303if exists("c_minlines")
304 let b:c_minlines = c_minlines
305else
306 if !exists("c_no_if0")
307 let b:c_minlines = 50 " #if 0 constructs can be long
308 else
309 let b:c_minlines = 15 " mostly for () constructs
310 endif
311endif
312exec "syn sync ccomment cComment minlines=" . b:c_minlines
313
314" Define the default highlighting.
315" For version 5.7 and earlier: only when not done already
316" For version 5.8 and later: only when an item doesn't have highlighting yet
317if version >= 508 || !exists("did_c_syn_inits")
318 if version < 508
319 let did_c_syn_inits = 1
320 command -nargs=+ HiLink hi link <args>
321 else
322 command -nargs=+ HiLink hi def link <args>
323 endif
324
325 HiLink cFormat cSpecial
326 HiLink cCppString cString
327 HiLink cCommentL cComment
328 HiLink cCommentStart cComment
329 HiLink cLabel Label
330 HiLink cUserLabel Label
331 HiLink cConditional Conditional
332 HiLink cRepeat Repeat
333 HiLink cCharacter Character
334 HiLink cSpecialCharacter cSpecial
335 HiLink cNumber Number
336 HiLink cOctal Number
337 HiLink cOctalZero PreProc " link this to Error if you want
338 HiLink cFloat Float
339 HiLink cOctalError cError
340 HiLink cParenError cError
341 HiLink cErrInParen cError
342 HiLink cErrInBracket cError
343 HiLink cCommentError cError
344 HiLink cCommentStartError cError
345 HiLink cSpaceError cError
346 HiLink cSpecialError cError
347 HiLink cOperator Operator
348 HiLink cStructure Structure
349 HiLink cStorageClass StorageClass
350 HiLink cInclude Include
351 HiLink cPreProc PreProc
352 HiLink cDefine Macro
353 HiLink cIncluded cString
354 HiLink cError Error
355 HiLink cStatement Statement
356 HiLink cPreCondit PreCondit
357 HiLink cType Type
358 HiLink cConstant Constant
359 HiLink cCommentString cString
360 HiLink cComment2String cString
361 HiLink cCommentSkip cComment
362 HiLink cString String
363 HiLink cComment Comment
364 HiLink cSpecial SpecialChar
365 HiLink cTodo Todo
366 HiLink cCppSkip cCppOut
367 HiLink cCppOut2 cCppOut
368 HiLink cCppOut Comment
369
370 delcommand HiLink
371endif
372
373let b:current_syntax = "edc"
374
375" vim: ts=8
diff --git a/data/edje/vim/autoload/edccomplete.vim b/data/edje/vim/autoload/edccomplete.vim
deleted file mode 100644
index e2521e9..0000000
--- a/data/edje/vim/autoload/edccomplete.vim
+++ /dev/null
@@ -1,892 +0,0 @@
1" Vim completion script
2" Language: EDC
3" Maintainer: Viktor Kojouharov
4" Last Change: 2007 02 24
5
6function! edccomplete#Complete(findstart, base)
7 if a:findstart
8 " locate the start of the word
9 let line = getline('.')
10 let start = col('.') - 1
11 let compl_begin = col('.') - 2
12 let lastword = -1
13 if line =~ ':' && line !~ '\.'
14 while start > 0 && (line[start - 1] =~ '\k' || line[start - 1] =~ '"')
15 let start -= 1
16 endwhile
17 else
18 while start > 0
19 if line[start - 1] =~ '\k'
20 let start -= 1
21 elseif line[start - 1] =~ '\.'
22 if lastword == -1
23 let lastword = start - 2
24 endif
25 let start -= 1
26 else
27 break
28 endif
29 endwhile
30 endif
31 let b:compl_context = getline('.')[0:compl_begin]
32
33 if lastword == -1
34 let ppe = searchpos('\.', 'bcn')
35 let pps = searchpos('\w\+\.', 'bcn')
36 let b:sparent = ''
37 if ppe != [0, 0] && pps[0] == ppe[0] && pps[1] <= ppe[1] && pps[0] == line('.')
38 let b:scontext = line[pps[1] -1 : ppe[1] - 2]
39 call edccomplete#FindParent(pps[0], pps[1])
40 return start
41 endif
42
43 let startpos = searchpair('{', '', '}', 'bnW')
44 let lnum = startpos
45 let line = getline(lnum)
46
47 if line !~ '\a\+'
48 let lnum = prevnonblank(lnum - 1)
49 let line = getline(lnum)
50 endif
51
52 call edccomplete#FindParent(lnum, 1)
53 let b:scontext = matchstr(line, '\w\+')
54
55 return start
56 else
57 let b:scontext = line[start : lastword]
58
59 return lastword + 2
60 endif
61 else
62 " find months matching with "a:base"
63 let res = []
64 if exists("b:compl_context")
65 let line = b:compl_context
66 unlet! b:compl_context
67 else
68 let line = a:base
69 endif
70
71 if b:scontext == 'part'
72 call edccomplete#AddLabel(res, line, a:base, s:partLabel)
73 call edccomplete#AddStatement(res, line, a:base, s:partStatement)
74 if line =~ 'type:\s*'
75 call edccomplete#AddKeyword(res, a:base, s:partTypes)
76 elseif line =~ 'effect:\s*'
77 call edccomplete#AddKeyword(res, a:base, s:partEffects)
78 elseif line =~ 'select_mode:\s*'
79 call edccomplete#AddKeyword(res, a:base, s:partSelectMode)
80 elseif line =~ 'ignore_flags:\s*'
81 call edccomplete#AddKeyword(res, a:base, s:partIgnoreFlags)
82 elseif line =~ 'pointer_mode:\s*'
83 call edccomplete#AddKeyword(res, a:base, s:partPointerMode)
84 elseif line =~ 'editable_mode:\s*'
85 call edccomplete#AddKeyword(res, a:base, s:partEditableMode)
86 endif
87 if line =~ 'image:\s*".\{-}"'
88 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
89 endif
90
91 elseif b:scontext == 'dragable'
92 call edccomplete#AddLabel(res, line, a:base, s:dragableLabel)
93
94 elseif b:scontext == 'description'
95 call edccomplete#AddLabel(res, line, a:base, s:descriptionLabel)
96 call edccomplete#AddStatement(res, line, a:base, s:descriptionStatement)
97 if line =~ 'aspect_preference:\s*'
98 call edccomplete#AddKeyword(res, a:base, s:aspectPrefTypes)
99 elseif line =~ 'inherit:\s*"\?'
100 call edccomplete#FindStates(res, a:base, 1)
101 endif
102
103 elseif b:scontext == 'rel1' || b:scontext == 'rel2'
104 call edccomplete#AddLabel(res, line, a:base, s:relLabel)
105 if line =~ 'to\%(_[xy]\)\?:\s*"\?'
106 call edccomplete#FindNamesIn(res, a:base, 'parts')
107 endif
108
109 elseif b:scontext == 'map'
110 call edccomplete#AddLabel(res, line, a:base, s:mapLabel)
111 call edccomplete#AddStatement(res, line, a:base, s:mapStatement)
112
113 elseif b:scontext == 'rotation'
114 call edccomplete#AddLabel(res, line, a:base, s:rotationLabel)
115
116 elseif b:scontext == 'perspective'
117 call edccomplete#AddLabel(res, line, a:base, s:perspectiveLabel)
118
119 elseif b:scontext == 'params'
120 call edccomplete#AddLabel(res, line, a:base, s:paramsLabel)
121
122 elseif b:scontext == 'image'
123 call edccomplete#AddLabel(res, line, a:base, s:imageLabel)
124 if line =~ 'image:\s*".\{-}"'
125 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
126 elseif line =~ 'middle:\s*'
127 call edccomplete#AddKeyword(res, a:base, s:imageMiddleTypes)
128 elseif line =~ 'scale_hint:\s*'
129 call edccomplete#AddKeyword(res, a:base, s:imageScaleHint)
130 endif
131
132 elseif b:scontext == 'fill'
133 call edccomplete#AddLabel(res, line, a:base, s:fillLabel)
134 call edccomplete#AddStatement(res, line, a:base, s:fillStatement)
135 if line =~ 'type:\s*'
136 call edccomplete#AddKeyword(res, a:base, s:fillTypes)
137 endif
138
139 elseif b:scontext == 'origin' || b:scontext == 'size'
140 call edccomplete#AddLabel(res, line, a:base, s:fillInnerStatement)
141
142 elseif b:scontext == 'text'
143 call edccomplete#AddLabel(res, line, a:base, s:textLabel)
144 call edccomplete#AddStatement(res, line, a:base, s:textStatement)
145
146 elseif b:scontext == 'program'
147 call edccomplete#AddLabel(res, line, a:base, s:programLabel)
148 call edccomplete#AddStatement(res, line, a:base, s:programStatement)
149 if line =~ 'transition:\s*'
150 call edccomplete#AddKeyword(res, a:base, s:transitionTypes)
151 elseif line =~ 'STATE_SET\s*"\?'
152 call edccomplete#FindStates(res, a:base, 0)
153 elseif line =~ 'action:\s*'
154 call edccomplete#AddKeyword(res, a:base, s:actionTypes)
155 elseif line =~ 'target:\s*"\?'
156 call edccomplete#FindNamesIn(res, a:base, 'parts')
157 elseif line =~ 'after:\s*"\?'
158 call edccomplete#FindNamesIn(res, a:base, 'programs')
159 endif
160
161 elseif b:scontext == 'programs'
162 call edccomplete#AddLabel(res, line, a:base, s:programsLabel)
163 call edccomplete#AddStatement(res, line, a:base, s:programsStatement)
164 if line =~ 'image:\s*".\{-}"'
165 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
166 endif
167
168 elseif b:scontext == 'box' && b:sparent == 'part'
169 call edccomplete#AddStatement(res, line, a:base, s:boxStatement)
170
171 elseif b:scontext == 'items'
172 call edccomplete#AddStatement(res, line, a:base, s:boxItemsStatement)
173
174 elseif b:scontext == 'item'
175 call edccomplete#AddLabel(res, line, a:base, s:boxItemLabel)
176 if line =~ 'type:\s*'
177 call edccomplete#AddKeyword(res, a:base, s:boxItemTypes)
178 elseif line =~ 'aspect_mode:\s*"\?'
179 call edccomplete#AddKeyword(res, a:base, s:boxItemAspectMode)
180 endif
181
182 elseif b:scontext == 'box' && b:sparent == 'description'
183 call edccomplete#AddLabel(res, line, a:base, s:boxDescLabel)
184 if line =~ 'layout:\s*'
185 call edccomplete#AddKeyword(res, a:base, s:boxLayout)
186 endif
187
188 elseif b:scontext == 'table' && b:sparent == 'description'
189 call edccomplete#AddLabel(res, line, a:base, s:tableDescLabel)
190 if line =~ 'homogeneous:\s*'
191 call edccomplete#AddKeyword(res, a:base, s:tableHomogeneousMode)
192 endif
193
194 elseif b:scontext == 'group'
195 call edccomplete#AddLabel(res, line, a:base, s:groupLabel)
196 call edccomplete#AddStatement(res, line, a:base, s:groupStatement)
197 if line =~ 'image:\s*".\{-}"'
198 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
199 endif
200
201 elseif b:scontext == 'parts'
202 call edccomplete#AddLabel(res, line, a:base, s:partsLabel)
203 call edccomplete#AddStatement(res, line, a:base, s:partsStatement)
204 if line =~ 'image:\s*".\{-}"'
205 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
206 endif
207
208 elseif b:scontext == 'data'
209 call edccomplete#AddLabel(res, line, a:base, s:dataLabel)
210
211 elseif b:scontext == 'fonts'
212 call edccomplete#AddLabel(res, line, a:base, s:fontsLabel)
213
214 elseif b:scontext == 'spectra'
215 call edccomplete#AddStatement(res, line, a:base, s:spectraStatement)
216
217 elseif b:scontext == 'spectrum'
218 call edccomplete#AddLabel(res, line, a:base, s:spectrumLabel)
219
220 elseif b:scontext == 'gradient'
221 call edccomplete#AddLabel(res, line, a:base, s:gradientLabel)
222 call edccomplete#AddStatement(res, line, a:base, s:gradientStatement)
223 if line =~ 'type:\s*'
224 call edccomplete#AddKeyword(res, a:base, s:gradientTypes)
225 endif
226
227 elseif b:scontext == 'styles'
228 call edccomplete#AddStatement(res, line, a:base, s:stylesStatement)
229
230 elseif b:scontext == 'style'
231 call edccomplete#AddLabel(res, line, a:base, s:styleLabel)
232
233 elseif b:scontext == 'color_classes'
234 call edccomplete#AddStatement(res, line, a:base, s:color_classesStatement)
235
236 elseif b:scontext == 'color_class'
237 call edccomplete#AddLabel(res, line, a:base, s:color_classLabel)
238
239 elseif b:scontext == 'images'
240 call edccomplete#AddLabel(res, line, a:base, s:imagesLabel)
241 if line =~ 'image:\s*".\{-}"'
242 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
243 endif
244
245 elseif b:scontext == 'collections'
246 call edccomplete#AddLabel(res, line, a:base, s:collectionsLabel)
247 call edccomplete#AddStatement(res, line, a:base, s:collectionsStatement)
248 if line =~ 'image:\s*".\{-}"'
249 call edccomplete#AddKeyword(res, a:base, s:imageStorageMethod)
250 endif
251
252 elseif b:scontext == 'externals'
253 call edccomplete#AddLabel(res, line, a:base, s:externalsLabel)
254
255 elseif strlen(b:scontext) == 0
256 call edccomplete#AddStatement(res, line, a:base, s:topStatement)
257 endif
258
259 unlet! b:scontext
260
261 return res
262 endif
263endfunction
264
265function! edccomplete#AddLabel(res, line, base, label)
266 if a:line =~ ':'
267 return
268 endif
269
270 for m in sort(keys(a:label))
271 if m =~ '^' . a:base
272 call add(a:res, {'word': m . ':', 'menu': a:label[m]})
273 endif
274 endfor
275endfunction
276
277function! edccomplete#AddKeyword(res, base, label)
278 for m in sort(keys(a:label))
279 if m =~ '^' . a:base
280 call add(a:res, {'word': m, 'menu': a:label[m]})
281 endif
282 endfor
283endfunction
284
285function! edccomplete#AddStatement(res, line, base, statement)
286 if a:line =~ ':'
287 return
288 endif
289
290 for m in sort(a:statement)
291 if m =~ '^' . a:base
292 call add(a:res, m . ' {')
293 endif
294 endfor
295endfunction
296
297function! edccomplete#FindStates(res, base, in_part)
298 let curpos = getpos('.')
299 call remove(curpos, 0, 0)
300
301 let states_list = []
302 if a:in_part == 1 " in the current part only
303 let part_start = search('^[ \t}]*\<part\>[ \t{]*$', 'bnW')
304 if part_start != 0 " found it
305 let line = getline(part_start)
306 if line !~ '{'
307 let part_start = nextnonblank(part_start)
308 endif
309 call cursor(part_start, 0)
310 let part_end = searchpair('{', '', '}', 'nW')
311 endif
312 else " in the current parts group
313 let part_start = search('^[ \t}]*\<parts\>[ \t{]*$', 'bnW')
314 if part_start != 0 " found it
315 let line = getline(part_start)
316 if line !~ '{'
317 let part_start = nextnonblank(part_start)
318 endif
319 call cursor(part_start, 0)
320 let part_end = searchpair('{', '', '}', 'nW')
321 endif
322 endif
323
324 let state_num = search('\%(state:\s*\)"\w\+"', 'W', part_end)
325 while state_num
326 let state = matchstr(getline(state_num), '\%(state:\s*\)\@<="\w\+"')
327 call extend(states_list, [state])
328 let state_num = search('\%(state:\s*\)"\w\+"', 'W', part_end)
329 endwhile
330 call cursor(curpos)
331
332 for m in sort(states_list)
333 if m =~ '^' . a:base
334 call add(a:res, m)
335 endif
336 endfor
337endfunction
338
339function! edccomplete#FindNamesIn(res, base, str)
340 let curpos = getpos('.')
341 call remove(curpos, 0, 0)
342
343 let names_list = []
344 let part_start = search('^[ \t}]*\<' . a:str . '\>[ \t{]*$', 'bnW')
345 if part_start != 0 " found it
346 let line = getline(part_start)
347 if line !~ '{'
348 let part_start = nextnonblank(part_start)
349 endif
350 call cursor(part_start, 0)
351 let part_end = searchpair('{', '', '}', 'nW')
352 endif
353
354 let name_num = search('\%(name:\s*\)"\w\+"', 'W', part_end)
355 while name_num
356 let name = matchstr(getline(name_num), '\%(name:\s*\)\@<="\w\+"')
357 call extend(names_list, [name])
358 let name_num = search('\%(name:\s*\)"\w\+"', 'W', part_end)
359 endwhile
360 call cursor(curpos)
361
362 for m in sort(names_list)
363 if m =~ '^' . a:base
364 call add(a:res, m)
365 endif
366 endfor
367endfunction
368
369function! edccomplete#FindParent(lnum, cnum)
370 call setpos('.', [0, a:lnum, a:cnum, 0])
371 let ppe = searchpos('\.', 'bcn')
372 let pps = searchpos('\w\+\.', 'bcn')
373 if ppe != [0, 0] && pps[0] == ppe[0] && pps[1] <= ppe[1] && pps[0] == line('.')
374 let b:sparent = line[pps[1] -1 : ppe[1] - 2]
375 return
376 endif
377
378 let startpos = searchpair('{', '', '}', 'bnW')
379 let lnum = startpos
380 let line = getline(lnum)
381
382 if line !~ '\a\+'
383 let line = getline(prevnonblank(lnum - 1))
384 endif
385
386 let b:sparent = matchstr(line, '\w\+')
387endfunction
388
389" part
390let s:partLabel = {
391 \ 'name': '"name"',
392 \ 'type': 'keyword',
393 \ 'effect': 'keyword',
394 \ 'clip_to': '"part_name"',
395 \ 'scale': '0-1',
396 \ 'mouse_events': '0-1',
397 \ 'repeat_events': '0-1',
398 \ 'ignore_flags': 'keyword ...',
399 \ 'pointer_mode': 'keyword',
400 \ 'select_mode': 'keyword',
401 \ 'precise_is_inside': '0-1',
402 \ 'use_alternate_font_metrics': '0-1',
403 \ 'image': '"filename" keyword',
404 \ 'font': '"filename" "name"',
405 \ 'entry_mode': 'keyword',
406 \ 'multiline': '0-1 (TEXTBLOCK only)',
407 \ 'source': '"group_name" (GROUP or TEXTBLOCK only)',
408 \ 'source2': '"group_name" (TEXTBLOCK only)',
409 \ 'source3': '"group_name" (TEXTBLOCK only)',
410 \ 'source4': '"group_name" (TEXTBLOCK only)',
411 \ 'source5': '"group_name" (TEXTBLOCK only)',
412 \ 'source6': '"group_name" (TEXTBLOCK only)',
413 \ }
414let s:partStatement = [
415 \ 'dragable',
416 \ 'images',
417 \ 'fonts',
418 \ 'description',
419 \ 'styles',
420 \ 'color_classes',
421 \ 'program',
422 \ 'programs',
423 \ 'box',
424 \ ]
425
426" dragable
427let s:dragableLabel = {
428 \ 'x': '0-1 int int',
429 \ 'y': '0-1 int int',
430 \ 'confine': '"part_name"',
431 \ 'events': '"draggable_part_name"',
432 \ }
433
434" description
435let s:descriptionLabel = {
436 \ 'state': '"name" index (float)',
437 \ 'inherit': '"description" index (float)',
438 \ 'visible': '0-1',
439 \ 'align': 'x y (float)',
440 \ 'fixed': 'width height (0-1)',
441 \ 'min': 'width height (int)',
442 \ 'max': 'width height (int)',
443 \ 'step': 'width height (int)',
444 \ 'aspect': 'min max (float)',
445 \ 'aspect_preference': 'keyword',
446 \ 'color_class': '"name"',
447 \ 'color': '0-255 0-255 0-255 0-255',
448 \ 'color2': '0-255 0-255 0-255 0-255',
449 \ 'color3': '0-255 0-255 0-255 0-255',
450 \ 'font': '"filename" "name"',
451 \ }
452let s:descriptionStatement = [
453 \ 'rel1',
454 \ 'rel2',
455 \ 'image',
456 \ 'fill',
457 \ 'text',
458 \ 'gradient',
459 \ 'images',
460 \ 'fonts',
461 \ 'styles',
462 \ 'color_classes',
463 \ 'program',
464 \ 'programs',
465 \ 'box',
466 \ 'map',
467 \ ]
468
469" rel
470let s:relLabel = {
471 \ 'relative': 'x y (float)',
472 \ 'offset': 'x y (int)',
473 \ 'to': '"part_name"',
474 \ 'to_x': '"part_name"',
475 \ 'to_y': '"part_name"',
476 \ }
477" map
478let s:mapLabel = {
479 \ 'on': '0-1',
480 \ 'perspective': '"part_name"',
481 \ 'light': '"part_name"',
482 \ 'smooth': '0-1',
483 \ 'pespective_on':'0-1',
484 \ 'backface_cull':'0-1',
485 \ 'alpha': '0-1',
486 \ }
487let s:mapStatement = [
488 \ 'rotation',
489 \ ]
490
491let s:rotationLabel = {
492 \ 'center': '"part_name"',
493 \ 'x': '"degrees (float)"',
494 \ 'y': '"degrees (float)"',
495 \ 'z': '"degrees (float)"',
496 \ }
497
498" params
499let s:paramsLabel = {
500 \ 'int': '"name" int',
501 \ 'double': '"name" double',
502 \ 'string': '"name" "string"',
503 \ }
504
505" perspective
506let s:perspectiveLabel = {
507 \ 'zplane': 'int',
508 \ 'focal': 'int',
509 \ }
510
511
512" image
513let s:imageLabel = {
514 \ 'image': '"filename" keyword',
515 \ 'normal': '"filename"',
516 \ 'tween': '"filename"',
517 \ 'border': 'left right top bottom (int)',
518 \ 'middle': 'keyword',
519 \ 'border_scale': '0-1',
520 \ 'scale_hint': 'keyword',
521 \ }
522
523" fill
524let s:fillLabel = {
525 \ 'smooth': '0-1',
526 \ 'angle': '0-360 (GRADIENT)',
527 \ 'spread': '0-1',
528 \ 'type': 'keyword',
529 \ }
530let s:fillStatement = [
531 \ 'origin',
532 \ 'size',
533 \ ]
534" fill origin/size
535let s:fillInnerStatement = {
536 \ 'relative': 'width height (float)',
537 \ 'offset': 'x y (int)',
538 \ }
539" fill types
540let s:fillTypes = {
541 \ 'SCALE': '',
542 \ 'TILE': '',
543 \ }
544
545" text
546let s:textLabel = {
547 \ 'text': '"string"',
548 \ 'font': '"font_name"',
549 \ 'size': 'size (int)',
550 \ 'text_class': '"class_name"',
551 \ 'fit': 'x y (0-1)',
552 \ 'min': 'x y (0-1)',
553 \ 'max': 'x y (0-1)',
554 \ 'align': 'x y (float)',
555 \ 'source': '"part_name"',
556 \ 'text_source': '"text_part_name"',
557 \ 'style': '"style_name"',
558 \ 'elipsis': '0.0-1.0',
559 \ 'repch': '"string" (PASSWORD mode)',
560 \ }
561let s:textStatement = [
562 \ 'fonts',
563 \ ]
564
565" program
566let s:programLabel = {
567 \ 'name': '"name"',
568 \ 'signal': '"signal_name"',
569 \ 'source': '"part_name"',
570 \ 'action': 'keyword ...',
571 \ 'transition': 'keyword time (float)',
572 \ 'filter': '"part_name" "state_name"',
573 \ 'in': 'from range (float)',
574 \ 'target': '"part_name"',
575 \ 'after': '"program_name"',
576 \ }
577let s:programStatement = [
578 \ 'script',
579 \ 'lua_script',
580 \ ]
581
582
583" programs
584let s:programsLabel = {
585 \ 'image': '"filename" keyword',
586 \ 'font': '"filename" "name"',
587 \ }
588let s:programsStatement = [
589 \ 'images',
590 \ 'fonts',
591 \ 'program',
592 \ ]
593
594" box and table
595let s:boxStatement = [
596 \ 'items',
597 \ ]
598let s:boxItemsStatement = [
599 \ 'item',
600 \ ]
601let s:boxItemLabel = {
602 \ 'type': 'keyword',
603 \ 'name': '"name"',
604 \ 'source': '"group_name"',
605 \ 'min': 'width height (int)',
606 \ 'prefer': 'width height (int)',
607 \ 'max': 'width height (int)',
608 \ 'padding': 'left right top bottom (int)',
609 \ 'align': 'x y (float)',
610 \ 'weight': 'x y (float)',
611 \ 'aspect': 'w h (float)',
612 \ 'aspect_mode': 'keyword',
613 \ 'options': '"extra options"',
614 \ }
615let s:boxDescLabel = {
616 \ 'layout': '"string" ["string"]',
617 \ 'align': 'float float',
618 \ 'padding': 'int int',
619 \ }
620let s:tableItemLabel = {
621 \ 'position': 'col row (int)',
622 \ 'span': 'col row (int)',
623 \ }
624let s:tableDescLabel = {
625 \ 'homogeneous': 'keyword',
626 \ 'align': 'float float',
627 \ 'padding': 'int int',
628 \ }
629
630" group
631let s:groupLabel = {
632 \ 'name': '"name"',
633 \ 'alias': '"alias"',
634 \ 'min': 'width height',
635 \ 'max': 'width height',
636 \ 'image': '"filename" keyword',
637 \ 'font': '"filename" "name"',
638 \ 'script_only': '0-1',
639 \ }
640let s:groupStatement = [
641 \ 'data',
642 \ 'script',
643 \ 'lua_script',
644 \ 'parts',
645 \ 'images',
646 \ 'fonts',
647 \ 'styles',
648 \ 'color_classes',
649 \ 'program',
650 \ 'programs',
651 \ 'externals',
652 \ ]
653
654" parts
655let s:partsStatement = [
656 \ 'images',
657 \ 'fonts',
658 \ 'part',
659 \ 'styles',
660 \ 'color_classes',
661 \ 'program',
662 \ 'programs',
663 \ ]
664let s:partsLabel = {
665 \ 'image': '"filename" keyword',
666 \ 'font': '"filename" "name"',
667 \ }
668
669" data
670let s:dataLabel = {
671 \ 'item': '"key" "value"',
672 \ 'file': '"key" "filename"',
673 \ }
674
675" fonts
676let s:fontsLabel = {
677 \ 'font': '"filename" "name"',
678 \ }
679
680"images
681let s:imagesLabel = {
682 \ 'image': '"filename" keyword',
683 \ }
684
685"collections
686let s:collectionsStatement = [
687 \ 'group',
688 \ 'images',
689 \ 'fonts',
690 \ 'styles',
691 \ 'color_classes',
692 \ 'externals',
693 \ ]
694let s:collectionsLabel = {
695 \ 'image': '"filename" keyword',
696 \ 'font': '"filename" "name"',
697 \ }
698
699" externals
700let s:externalsLabel = {
701 \ 'external': '"name"',
702 \ }
703
704" spectra
705let s:spectraStatement = [
706 \ 'spectrum',
707 \ ]
708" spectrum
709let s:spectrumLabel = {
710 \ 'name': '"name"',
711 \ 'color': '0-255 0-255 0-255 0-255',
712 \ }
713" gradient
714let s:gradientLabel = {
715 \ 'type': '"keyword"',
716 \ 'spectrum': '"spectrum_name"',
717 \ }
718let s:gradientStatement = [
719 \ 'rel1',
720 \ 'rel2',
721 \ ]
722" gradient types
723let s:gradientTypes = {
724 \ '"linear"': '',
725 \ '"radial"': '',
726 \ '"rectangular"': '',
727 \ '"angular"': '',
728 \ '"sinusoidal"': '',
729 \ }
730
731" styles
732let s:stylesStatement = [
733 \ 'style',
734 \ ]
735" style
736let s:styleLabel = {
737 \ 'name': '"name"',
738 \ 'base': '".. default style properties .."',
739 \ 'tag': '"tagname" "style properties"',
740 \ }
741
742" color_classes
743let s:color_classesStatement = [
744 \ 'color_class',
745 \ ]
746" color_class
747let s:color_classLabel = {
748 \ 'name': '"name"',
749 \ 'color': '0-255 0-255 0-255 0-255',
750 \ 'color2': '0-255 0-255 0-255 0-255',
751 \ 'color3': '0-255 0-255 0-255 0-255',
752 \ }
753
754" toplevel
755let s:topStatement = [
756 \ 'fonts',
757 \ 'images',
758 \ 'data',
759 \ 'collections',
760 \ 'spectra',
761 \ 'styles',
762 \ 'color_classes',
763 \ 'externals',
764 \ ]
765
766" images image storage method
767let s:imageStorageMethod = {
768 \ 'COMP': '',
769 \ 'RAW': '',
770 \ 'USER': '',
771 \ 'LOSSY': '0-100',
772 \ }
773" image middle types
774let s:imageMiddleTypes = {
775 \ '0': '',
776 \ '1': '',
777 \ 'NONE': '',
778 \ 'DEFAULT': '',
779 \ 'SOLID': '',
780 \ }
781" image scale hint
782let s:imageScaleHint = {
783 \ '0': '',
784 \ 'NONE': '',
785 \ 'DYNAMIC': '',
786 \ 'STATIC': '',
787 \ }
788
789" part types
790let s:partTypes = {
791 \ 'TEXT': '',
792 \ 'IMAGE': '',
793 \ 'RECT': '',
794 \ 'TEXTBLOCK': '',
795 \ 'SWALLOW': '',
796 \ 'GRADIENT': '',
797 \ 'GROUP': '',
798 \ 'BOX': '',
799 \ 'TABLE': '',
800 \ 'EXTERNAL': '',
801 \ }
802" part effects
803let s:partEffects = {
804 \ 'NONE': '',
805 \ 'PLAIN': '',
806 \ 'OUTLINE': '',
807 \ 'SOFT_OUTLINE': '',
808 \ 'SHADOW': '',
809 \ 'SOFT_SHADOW': '',
810 \ 'OUTLINE_SHADOW': '',
811 \ 'OUTLINE_SOFT_SHADOW': '',
812 \ 'FAR_SHADOW': '',
813 \ 'FAR_SOFT_SHADOW': '',
814 \ 'GLOW': '',
815 \ }
816" part select_mode
817let s:partSelectMode = {
818 \ 'DEFAULT': '',
819 \ 'EXPLICIT': '',
820 \ }
821" part ignore flags
822let s:partIgnoreFlags = {
823 \ 'NONE': '',
824 \ 'ON_HOLD': '',
825 \ }
826" part pointer mode
827let s:partPointerMode = {
828 \ 'AUTOGRAB': '',
829 \ 'NOGRAB': '',
830 \ }
831" part editable_mode
832let s:partEditableMode = {
833 \ 'NONE': '',
834 \ 'PLAIN': '',
835 \ 'EDITABLE': '',
836 \ 'PASSWORD': '',
837 \ }
838
839" aspect_preference types
840let s:aspectPrefTypes = {
841 \ 'VERTICAL': '',
842 \ 'HORIZONTAL': '',
843 \ 'BOTH': '',
844 \ }
845
846" program transition types
847let s:transitionTypes = {
848 \ 'LINEAR': '0.0 - 1.0',
849 \ 'SINUSOIDAL': '0.0 - 1.0',
850 \ 'ACCELERATE': '0.0 - 1.0',
851 \ 'DECELERATE': '0.0 - 1.0',
852 \ }
853" program action types
854let s:actionTypes = {
855 \ 'STATE_SET': '"string" "0.0 - 1.0"',
856 \ 'ACTION_STOP': '',
857 \ 'SIGNAL_EMIT': '"string" "string"',
858 \ 'DRAG_VAL_SET': 'float float',
859 \ 'DRAG_VAL_STEP': 'float float',
860 \ 'DRAG_VAL_PAGE': 'float float',
861 \ 'FOCUS_SET': '',
862 \ }
863" box item types
864let s:boxItemTypes = {
865 \ 'GROUP': '',
866 \ }
867" box item aspect mode
868let s:boxItemAspectMode = {
869 \ 'NONE': '',
870 \ 'NEITHER': '',
871 \ 'VERTICAL': '',
872 \ 'HORIZONTAL': '',
873 \ 'BOTH': '',
874 \ }
875" box layout
876let s:boxLayout = {
877 \ '"horizontal"': '',
878 \ '"horizontal_homogeneous"': '',
879 \ '"horizontal_max"': '',
880 \ '"horizontal_flow"': '',
881 \ '"vertical"': '',
882 \ '"vertical_homogeneous"': '',
883 \ '"vertical_max"': '',
884 \ '"vertical_flow"': '',
885 \ '"stack"': '',
886 \ }
887" table homogeneous mode
888let s:tableHomogeneousMode = {
889 \ 'NONE': '',
890 \ 'TABLE': '',
891 \ 'ITEM': '',
892 \ }
diff --git a/data/edje/vim/ftdetect/edc.vim b/data/edje/vim/ftdetect/edc.vim
deleted file mode 100644
index d8cc228..0000000
--- a/data/edje/vim/ftdetect/edc.vim
+++ /dev/null
@@ -1,3 +0,0 @@
1au BufRead,BufNewFile *.edc set filetype=edc
2au BufRead,BufNewFile *.sma set filetype=embryo
3au BufRead,BufNewFile *.embryo set filetype=embryo
diff --git a/data/edje/vim/ftplugin/edc.vim b/data/edje/vim/ftplugin/edc.vim
deleted file mode 100644
index 5a90a56..0000000
--- a/data/edje/vim/ftplugin/edc.vim
+++ /dev/null
@@ -1,23 +0,0 @@
1" Vim filetype plugin file
2" Language: EDC
3" Maintainer: Viktor Kojouharov
4" Latest Revision: 2006-10-29
5
6if exists("b:did_ftplugin")
7 finish
8endif
9let b:did_ftplugin = 1
10
11let b:undo_ftplugin = "setl com< cms< inc< fo< efm< mp<"
12
13setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
14setlocal commentstring=/*%s*/
15setlocal formatoptions-=t formatoptions+=croql
16setlocal include=^\s*#\s*include
17setlocal efm=edje_cc:%s.\ %f:%l\ %m
18setlocal mp=edje_cc\ %
19
20if exists('&ofu')
21 setlocal ofu=edccomplete#Complete
22 setlocal cfu=edccomplete#Complete
23endif
diff --git a/data/edje/vim/indent/edc.vim b/data/edje/vim/indent/edc.vim
deleted file mode 100644
index 498be4a..0000000
--- a/data/edje/vim/indent/edc.vim
+++ /dev/null
@@ -1,83 +0,0 @@
1" Vim indent file
2" Language: EDC
3" Maintainer: Viktor Kojouharov
4" Latest Revision: 2007 02 24
5
6if exists("b:did_indent")
7 finish
8endif
9let b:did_indent = 1
10
11setlocal indentexpr=GetEDCIndent()
12setlocal indentkeys=0{,0},!^F,o,O
13
14if exists("*GetEDCIndent")
15 finish
16endif
17
18function s:prevnonblanknoncomment(lnum)
19 let lnum = a:lnum
20 while lnum > 1
21 let lnum = prevnonblank(lnum)
22 let line = getline(lnum)
23 if line =~ '\*/'
24 while lnum > 1 && line !~ '/\*'
25 let lnum -= 1
26 endwhile
27 if line =~ '^\s*/\*'
28 let lnum -= 1
29 else
30 break
31 endif
32 elseif line =~ '^\s*//'
33 let lnum -= 1
34 else
35 break
36 endif
37 endwhile
38 return lnum
39endfunction
40
41function s:count_braces(lnum, count_open)
42 let n_open = 0
43 let n_close = 0
44 let line = getline(a:lnum)
45 let pattern = '[{}]'
46 let i = match(line, pattern)
47 while i != -1
48 if synIDattr(synID(a:lnum, i + 1, 0), 'name') !~ 'c\%(CommentL\|Comment\|StringQ\{1,2}\)'
49 if line[i] == '{'
50 let n_open += 1
51 elseif line[i] == '}'
52 if n_open > 0
53 let n_open -= 1
54 else
55 let n_close += 1
56 endif
57 endif
58 endif
59 let i = match(line, pattern, i + 1)
60 endwhile
61 return a:count_open ? n_open : n_close
62endfunction
63
64function GetEDCIndent()
65 let line = getline(v:lnum)
66 if line =~ '^\s*\*' || line =~ '^\s*//' || line =~ '^\s*}'
67 return cindent(v:lnum)
68 endif
69
70 let pnum = s:prevnonblanknoncomment(v:lnum - 1)
71 if pnum == 0
72 return 0
73 endif
74
75 let ind = indent(pnum) + s:count_braces(pnum, 1) * &sw
76
77 let pline = getline(pnum)
78 if pline =~ '}\s*$'
79 let ind -= (s:count_braces(pnum, 0) - (pline =~ '^\s*}' ? 1 : 0)) * &sw
80 endif
81
82 return ind
83endfunction
diff --git a/data/edje/vim/plugin-info.txt b/data/edje/vim/plugin-info.txt
deleted file mode 100644
index e01cb42..0000000
--- a/data/edje/vim/plugin-info.txt
+++ /dev/null
@@ -1,8 +0,0 @@
1{
2 "name" : "edje",
3 "version" : "dev",
4 "author" : "viktor kojouharov <vkojouharov at gmail.com>",
5 "repository" : {"type": "svn", "url": "http://svn.enlightenment.org/svn/e/trunk/edje/data/vim/"},
6 "dependencies" : {},
7 "description" : "Edje vim support addon"
8}
diff --git a/data/edje/vim/snippets/edc.snippets b/data/edje/vim/snippets/edc.snippets
deleted file mode 100644
index bb93e42..0000000
--- a/data/edje/vim/snippets/edc.snippets
+++ /dev/null
@@ -1,99 +0,0 @@
1snippet col
2 collections {
3 ${1}
4 }
5
6snippet images
7 images {
8 ${1}
9 }
10
11snippet image
12 image: "${1:.png}" COMP;
13
14snippet group
15 group { name: "${1}";
16 ${2}
17 parts {
18 ${3}
19 }
20 }
21
22snippet part
23 part { name: "${1}";
24 type: ${2:RECT};
25 mouse_events: 0;
26 description { state: "default" 0.0;
27 visible: 1;
28 color: 255 255 255 255;
29 rel1 {
30 to_x: "${2:bg}";
31 to_y: "${3:bg}";
32 relative: 0.0 0.0;
33 offset: 0 0;
34 }
35 rel2 {
36 to_x: "${4:bg}";
37 to_y: "${5:bg}";
38 relative: 1.0 1.0;
39 offset: -1 -1;
40 }
41 }
42 }
43
44snippet bg
45 part { name: "${1:bg}";
46 type: RECT;
47 mouse_events: 0;
48 description { state: "default" 0.0;
49 visible: 1;
50 color: 0 0 0 0;
51 }
52 }
53
54snippet event
55 part { name: "${1:event}";
56 type: RECT;
57 mouse_events: 1;
58 description { state: "default" 0.0;
59 visible: 1;
60 color: 0 0 0 0;
61 }
62 }
63
64snippet IMAGE
65 part { name: "${1:image}";
66 type: IMAGE;
67 mouse_events: 0;
68 description { state: "default" 0.0;
69 visible: 1;
70 image {
71 normal: "${2}";
72 border: 0 0 0 0;
73 middle: 1;
74 }
75 }
76 }
77
78snippet desc
79 description { state: "${1}" ${2:0.0};
80 inherit: "default" 0.0;
81 ${3}
82 }
83
84snippet programs
85 programs {
86 ${1}
87 }
88
89snippet program
90 program { name: "${1}";
91 ${2}
92 }
93
94snippet clicked
95 program { name: "${1:mouse_clicked}";
96 signal: "mouse,clicked,${2:1}";
97 source: "${2:event}";
98 action: SIGNAL_EMIT "${3}" "${4}";
99 }
diff --git a/data/edje/vim/syntax/edc.vim b/data/edje/vim/syntax/edc.vim
deleted file mode 100644
index 6d87d70..0000000
--- a/data/edje/vim/syntax/edc.vim
+++ /dev/null
@@ -1,246 +0,0 @@
1" Vim syntax file
2" Language: EDC
3" Maintainer: Viktor Kojouharov
4" Last Change: 2007 02 24
5
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
12endif
13
14" A bunch of useful keywords
15syn keyword edcBlock images data fonts collections group contained
16syn keyword edcBlock part parts dragable description contained
17syn keyword edcBlock text font fill origin size image proxy contained
18syn keyword edcBlock programs program styles style contained
19syn keyword edcBlock gradient spectra spectrum contained
20syn keyword edcBlock color_classes color_class rel1 rel2 contained
21syn keyword edcBlock items item file params externals contained
22syn keyword edcBlock map rotation perspective script lua_script contained
23syn keyword edcBlock set
24
25syn keyword edcLabel item name alias min max type effect contained
26syn keyword edcLabel mouse_events repeat_events clip_to contained
27syn keyword edcLabel x y z confine events scale contained
28syn keyword edcLabel ignore_flags precise_is_inside select_mode contained
29syn keyword edcLabel use_alternate_font_metrics entry_mode contained
30syn keyword edcLabel source source2 source3 source4 contained
31syn keyword edcLabel source5 source6 multiline pointer_mode contained
32syn keyword edcLabel state visible step aspect fixed middle contained
33syn keyword edcLabel aspect_preference ellipsis elipsis image contained
34syn keyword edcLabel relative offset to to_x to_y contained
35syn keyword edcLabel source_visible source_clip contained
36syn keyword edcLabel border border_scale border_scale_by scale_hint color color2 color3 font size contained
37syn keyword edcLabel signal action transition in filter contained
38syn keyword edcLabel target after fit align contained
39syn keyword edcLabel text smooth inherit tag base style contained
40syn keyword edcLabel text_source color_class text_class contained
41syn keyword edcLabel spectrum angle spread normal tween contained
42syn keyword edcLabel padding prefer weight aspect_mode contained
43syn keyword edcLabel options layout position span contained
44syn keyword edcLabel homogeneous contained
45syn keyword edcLabel on perspective light perspective_on contained
46syn keyword edcLabel backface_cull alpha center focus zplane focal contained
47syn keyword edcLabel int double string external script_only contained
48syn keyword edcLabel insert_before insert_after contained
49
50syn keyword edcConstant COMP RAW LOSSY NONE ON_HOLD AUTOGRAB NOGRAB
51syn keyword edcConstant TEXT IMAGE RECT TEXTBLOCK SWALLOW GRADIENT GROUP
52syn keyword edcConstant SPACER
53syn keyword edcConstant NONE PLAIN OUTLINE SOFT_OUTLINE SHADOW PROXY
54syn keyword edcConstant SOFT_SHADOW OUTLINE_SHADOW OUTLINE_SOFT_SHADOW
55syn keyword edcConstant GLOW FAR_SHADOW FAR_SOFT_SHADOW
56syn keyword edcConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
57syn keyword edcConstant TOP_LEFT TOP TOP_RIGHT RIGHT
58syn keyword edcConstant STATE_SET ACTION_STOP SIGNAL_EMIT FOCUS_SET
59syn keyword edcConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
60syn keyword edcConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE
61syn keyword edcConstant LIN DECEL DIVIS BOUNCE SPRING CURRENT
62syn keyword edcConstant ACCEL_FAC DECEL_FAC SIN_FAC DIVISOR_INTERP
63syn keyword edcConstant ACCELERATE_FACTOR DECELERATE_FACTOR
64syn keyword edcConstant VERTICAL HORIZONTAL BOTH BOX TABLE
65syn keyword edcConstant EDITABLE PASSWORD "default"
66syn keyword edcConstant DEFAULT EXPLICIT
67syn keyword edcConstant SOLID
68
69syn keyword edcTodo contained TODO FIXME XXX
70
71syn match edcLabelMatch "\w\+:" contains=edcLabel
72syn match edcBlockMatch "\w\+\_s*{" contains=edcBlock
73syn match edcBlockMatch "\w\+\.\a"me=e-2 contains=edcBlock
74" edcCommentGroup allows adding matches for special things in comments
75syn cluster edcCommentGroup contains=edcTodo
76
77" String and Character constants
78" Highlight special characters (those which have a backslash) differently
79syn match edcSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)"
80syn region edcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=edcSpecial
81syn match edcFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
82syn match edcFormat display "%%" contained
83syn region edcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat
84
85syn match edcCharacter "L\='[^\\]'"
86syn match edcCharacter "L'[^']*'" contains=edcSpecial
87syn match edcSpecialError "L\='\\[^'\"?\\abfnrtv]'"
88syn match edcSpecialCharacter "L\='\\['\"?\\abfnrtv]'"
89syn match edcSpecialCharacter display "L\='\\\o\{1,3}'"
90syn match edcSpecialCharacter display "'\\x\x\{1,2}'"
91syn match edcSpecialCharacter display "L'\\x\x\+'"
92
93"when wanted, highlight trailing white space
94if exists("edc_space_errors")
95 if !exists("edc_no_trail_space_error")
96 syn match edcSpaceError display excludenl "\s\+$"
97 endif
98 if !exists("edc_no_tab_space_error")
99 syn match edcSpaceError display " \+\t"me=e-1
100 endif
101endif
102
103"catch errors caused by wrong parenthesis and brackets
104syn cluster edcParenGroup contains=edcParenError,edcIncluded,edcSpecial,edcCommentSkip,edcCommentString,edcComment2String,@edcCommentGroup,edcCommentStartError,edcUserCont,edcUserLabel,edcBitField,edcCommentSkip,edcOctalZero,edcFormat,edcNumber,edcFloat,edcOctal,edcOctalError,edcNumbersCom
105if exists("edc_no_bracket_error")
106 syn region edcParen transparent start='(' end=')' contains=ALLBUT,@edcParenGroup
107 syn match edcParenError display ")"
108 syn match edcErrInParen display contained "[{}]"
109else
110 syn region edcParen transparent start='(' end=')' contains=ALLBUT,@edcParenGroup,edcErrInBracket
111 syn match edcParenError display "[\])]"
112 syn match edcErrInParen display contained "[\]{}]"
113 syn region edcBracket transparent start='\[' end=']' contains=ALLBUT,@edcParenGroup,edcErrInParen
114 syn match edcErrInBracket display contained "[);{}]"
115endif
116
117"integer number, or floating point number without a dot and with "f".
118syn case ignore
119syn match edcNumbers display transparent "\<\d\|\.\d" contains=edcNumber,edcFloat,edcOctalError,edcOctal
120" Same, but without octal error (for comments)
121syn match edcNumbersCom display contained transparent "\<\d\|\.\d" contains=edcNumber,edcFloat,edcOctal
122syn match edcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
123"hex number
124syn match edcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
125" Flag the first zero of an octal number as something special
126syn match edcOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=edcOctalZero
127syn match edcOctalZero display contained "\<0"
128syn match edcFloat display contained "\d\+f"
129"floating point number, with dot, optional exponent
130syn match edcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
131"floating point number, starting with a dot, optional exponent
132syn match edcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
133"floating point number, without dot, with exponent
134syn match edcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>"
135" flag an octal number with wrong digits
136syn match edcOctalError display contained "0\o*[89]\d*"
137syn case match
138
139if exists("edc_comment_strings")
140 " A comment can contain edcString, edcCharacter and edcNumber.
141 " But a "*/" inside a edcString in a edcComment DOES end the comment! So we
142 " need to use a special type of edcString: edcCommentString, which also ends
143 " on "*/", and sees a "*" at the start of the line as comment again.
144 " Unfortunately this doesn't very well work for // type of comments :-(
145 syntax match edcCommentSkip contained "^\s*\*\($\|\s\+\)"
146 syntax region edcCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=edcSpecial,edcCommentSkip
147 syntax region edcComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=edcSpecial
148 syntax region edcCommentL start="//" skip="\\$" end="$" keepend contains=@edcCommentGroup,edcComment2String,edcCharacter,edcNumbersCom,edcSpaceError
149 syntax region edcComment matchgroup=edcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@edcCommentGroup,edcCommentStartError,edcCommentString,edcCharacter,edcNumbersCom,edcSpaceError
150else
151 syn region edcCommentL start="//" skip="\\$" end="$" keepend contains=@edcCommentGroup,edcSpaceError
152 syn region edcComment matchgroup=edcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@edcCommentGroup,edcCommentStartError,edcSpaceError
153endif
154" keep a // comment separately, it terminates a preproc. conditional
155syntax match edcCommentError display "\*/"
156syntax match edcCommentStartError display "/\*"me=e-1 contained
157
158syn region edcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=edcComment,edcCharacter,edcParenError,edcNumbers,edcCommentError,edcSpaceError
159syn match edcPreCondit display "^\s*#\s*\(else\|endif\)\>"
160syn region edcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
161syn match edcIncluded display contained "<[^>]*>"
162syn match edcInclude display "^\s*#\s*include\>\s*["<]" contains=edcIncluded
163syn cluster edcPreProcGroup contains=edcPreCondit,edcIncluded,edcInclude,edcDefine,edcErrInParen,edcErrInBracket,edcCommentSkip,edcCommentString,edcComment2String,@edcCommentGroup,edcCommentStartError,edcParen,edcBracket,edcMulti,edcUserLabel
164syn cluster edcAlphaNum contains=edcSpecial,edcOctalZero,edcFormat,edcNumber,edcFloat,edcOctal,edcOctalError,edcNumbersCom,edcString
165syn region edcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@edcPreProcGroup
166syn region edcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@edcPreProcGroup
167
168syn match edcUserLabel display "\I\i*" contained
169
170syn include @edcEmbryo syntax/embryo.vim
171unlet b:current_syntax
172syn region edcScript matchgroup=edcScriptTag start="\<script\_s*{" end="}" contains=@edcEmbryo,edcScriptTag
173syn keyword edcScriptTag contained script
174
175syn include @edcLua syntax/lua.vim
176unlet b:current_syntax
177syn region edcLuaScript matchgroup=edcLuaScriptTag start="\<lua_script\_s*{" end="}" contains=@edcLua,edcLuaScriptTag
178syn keyword edcLuaScriptTag contained script
179
180if exists("edc_minlines")
181 let b:edc_minlines = edc_minlines
182else
183 let b:edc_minlines = 50 " #if 0 constructs can be long
184endif
185exec "syn sync ccomment edcComment minlines=" . b:edc_minlines
186"syn sync fromstart
187
188" Define the default highlighting.
189" For version 5.7 and earlier: only when not done already
190" For version 5.8 and later: only when an item doesn't have highlighting yet
191if version >= 508 || !exists("did_edc_syn_inits")
192 if version < 508
193 let did_edc_syn_inits = 1
194 command -nargs=+ HiLink hi link <args>
195 else
196 command -nargs=+ HiLink hi def link <args>
197 endif
198
199 HiLink edcFormat edcSpecial
200 HiLink edcCommentL edcComment
201 HiLink edcCommentStart edcComment
202 HiLink edcLabel Label
203 HiLink edcUserLabel Label
204 HiLink edcConditional Conditional
205 HiLink edcRepeat Repeat
206 HiLink edcCharacter Character
207 HiLink edcSpecialCharacter cSpecial
208 HiLink edcNumber Number
209 HiLink edcOctal Number
210 HiLink edcOctalZero PreProc " link this to Error if you want
211 HiLink edcFloat Float
212 HiLink edcOctalError edcError
213 HiLink edcParenError edcError
214 HiLink edcErrInParen edcError
215 HiLink edcErrInBracket edcError
216 HiLink edcCommentError edcError
217 HiLink edcCommentStartError edcError
218 HiLink edcSpaceError edcError
219 HiLink edcSpecialError edcError
220 HiLink edcOperator Operator
221 HiLink edcStructure Structure
222 HiLink edcStorageClass StorageClass
223 HiLink edcInclude Include
224 HiLink edcPreProc PreProc
225 HiLink edcDefine Macro
226 HiLink edcIncluded edcString
227 HiLink edcError Error
228 HiLink edcBlock Function
229 HiLink edcScriptTag Function
230 HiLink edcLuaScriptTag Function
231 HiLink edcPreCondit PreCondit
232 HiLink edcConstant Constant
233 HiLink edcCommentString edcString
234 HiLink edcComment2String edcString
235 HiLink edcCommentSkip edcComment
236 HiLink edcString String
237 HiLink edcComment Comment
238 HiLink edcSpecial SpecialChar
239 HiLink edcTodo Todo
240
241 delcommand HiLink
242endif
243
244let b:current_syntax = "edc"
245
246" vim: ts=8
diff --git a/data/edje/vim/syntax/embryo.vim b/data/edje/vim/syntax/embryo.vim
deleted file mode 100644
index 11175d8..0000000
--- 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
5
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
12endif
13
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
24
25syn keyword embryoTodo contained TODO FIXME XXX
26
27" embryoCommentGroup allows adding matches for special things in comments
28syn cluster embryoCommentGroup contains=embryoTodo
29
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
37
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\+'"
45
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
54endif
55
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 "[{}]"
62else
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 "[);{}]"
68endif
69
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
92
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
104else
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
107endif
108" keep a // comment separately, it terminates a preproc. conditional
109syntax match embryoCommentError display "\*/"
110syntax match embryoCommentStartErr display "/\*"me=e-1 contained
111
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
121
122syn match embryoUserLabel display "\I\i*" contained
123
124syn match embryoFunctionName "\h\w*\s*\%((\@=\)"
125
126if exists("embryo_minlines")
127 let b:embryo_minlines = embryo_minlines
128else
129 let b:embryo_minlines = 50 " #if 0 constructs can be long
130endif
131exec "syn sync ccomment embryoComment minlines=" . b:embryo_minlines
132"syn sync fromstart
133
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
144
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
189
190 delcommand HiLink
191endif
192
193let b:current_syntax = "embryo"
194
195" vim: ts=8