| 1 |
lars |
1 |
" Vim syntax file
|
|
|
2 |
" Language: Xdebug trace files (context or unified)
|
|
|
3 |
" Maintainer: Derick Rethans <derick@xdebug.org>
|
|
|
4 |
" Last Change: 2010 Jun 06
|
|
|
5 |
|
|
|
6 |
" For version 5.x: Clear all syntax items
|
|
|
7 |
" For version 6.x: Quit when a syntax file was already loaded
|
|
|
8 |
if version < 600
|
|
|
9 |
syntax clear
|
|
|
10 |
elseif exists("b:current_syntax")
|
|
|
11 |
finish
|
|
|
12 |
endif
|
|
|
13 |
|
|
|
14 |
syn match begin "^TRACE START"
|
|
|
15 |
syn match end "^TRACE END"
|
|
|
16 |
syn match date "\[.*\]"
|
|
|
17 |
|
|
|
18 |
syn match min_memory "+\d\+"
|
|
|
19 |
syn match pls_memory "-\d\+"
|
|
|
20 |
syn match nll_memory "+0"
|
|
|
21 |
|
|
|
22 |
syn match level "->"
|
|
|
23 |
syn match lineno ":\d\+$"
|
|
|
24 |
|
|
|
25 |
syn match result ">=>.\+"
|
|
|
26 |
syn match assignment "=> \$[a-z]\+\(->[a-z]\+\)*\ .*="
|
|
|
27 |
syn match assignment "=> \$[a-z]\+\['\([a-z]\+\)*'\]\ .*="
|
|
|
28 |
|
|
|
29 |
syn match methodcall "\k\+->"
|
|
|
30 |
syn match staticcall "\k\+::"
|
|
|
31 |
syn match functionb "\k\+("
|
|
|
32 |
syn match functione ") "
|
|
|
33 |
|
|
|
34 |
syn match main "{main}()"
|
|
|
35 |
syn match include "include\(_once\)\=('.\+')"
|
|
|
36 |
|
|
|
37 |
" Define the default highlighting.
|
|
|
38 |
" For version 5.7 and earlier: only when not done already
|
|
|
39 |
" For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
|
40 |
if version >= 508 || !exists("did_diff_syntax_inits")
|
|
|
41 |
if version < 508
|
|
|
42 |
let did_diff_syntax_inits = 1
|
|
|
43 |
command -nargs=+ HiLink hi link <args>
|
|
|
44 |
else
|
|
|
45 |
command -nargs=+ HiLink hi def link <args>
|
|
|
46 |
endif
|
|
|
47 |
|
|
|
48 |
HiLink begin Label
|
|
|
49 |
HiLink end Label
|
|
|
50 |
HiLink date Label
|
|
|
51 |
HiLink assignment Label
|
|
|
52 |
|
|
|
53 |
HiLink level SpecialChar
|
|
|
54 |
HiLink result Constant
|
|
|
55 |
|
|
|
56 |
HiLink min_memory Constant
|
|
|
57 |
HiLink pls_memory Structure
|
|
|
58 |
HiLink nll_memory Comment
|
|
|
59 |
|
|
|
60 |
HiLink main Structure
|
|
|
61 |
HiLink include Structure
|
|
|
62 |
|
|
|
63 |
HiLink lineno Delimiter
|
|
|
64 |
HiLink methodcall Function
|
|
|
65 |
HiLink staticcall Function
|
|
|
66 |
HiLink functionb Function
|
|
|
67 |
HiLink functione Function
|
|
|
68 |
|
|
|
69 |
delcommand HiLink
|
|
|
70 |
endif
|
|
|
71 |
|
|
|
72 |
let b:current_syntax = "xt"
|
|
|
73 |
|
|
|
74 |
:set foldmethod=expr
|
|
|
75 |
:set foldexpr=strlen(substitute(substitute(substitute(substitute(getline(v:lnum),'^TR.*$','',''),'\\s>=>','->',\"g\"),'^\\s.\\{20\\}\\(\\s\\+\\)\\?->.*$','\\1',''),'\\s\\s','\ ',\"g\"))-2
|
|
|
76 |
:set foldlevel=9999
|
|
|
77 |
|
|
|
78 |
" vim: ts=8 sw=2
|