Mercurial > vim
annotate runtime/syntax/valgrind.vim @ 5766:b0a9df477096 v7.4.227
updated for version 7.4.227
Problem: Can't build with Ruby 1.8.
Solution: Do include a check for the Ruby version. (Ken Takata)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 28 Mar 2014 21:58:21 +0100 |
parents | d1e4abe8342c |
children | bd18da914be9 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: Valgrind Memory Debugger Output | |
3 " Maintainer: Roger Luethi <rl@hellgate.ch> | |
4 " Program URL: http://devel-home.kde.org/~sewardj/ | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
5 " Last Change: 2012 Apr 30 |
7 | 6 " |
7 " Notes: mostly based on strace.vim and xml.vim | |
8 | |
9 " Quit when a syntax file was already loaded | |
10 if exists("b:current_syntax") | |
11 finish | |
12 endif | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
13 let s:keepcpo= &cpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
14 set cpo&vim |
7 | 15 |
16 syn case match | |
17 syn sync minlines=50 | |
18 | |
19 syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" | |
20 | |
21 syn region valgrindRegion | |
22 \ start=+^==\z(\d\+\)== \w.*$+ | |
23 \ skip=+^==\z1==\( \| .*\)$+ | |
24 \ end=+^+ | |
25 \ fold | |
26 \ keepend | |
27 \ contains=valgrindPidChunk,valgrindLine | |
28 | |
29 syn region valgrindPidChunk | |
30 \ start=+\(^==\)\@<=+ | |
31 \ end=+\(==\)\@=+ | |
32 \ contained | |
33 \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 | |
34 \ keepend | |
35 | |
36 syn match valgrindPid0 "\d\+0=" contained | |
37 syn match valgrindPid1 "\d\+1=" contained | |
38 syn match valgrindPid2 "\d\+2=" contained | |
39 syn match valgrindPid3 "\d\+3=" contained | |
40 syn match valgrindPid4 "\d\+4=" contained | |
41 syn match valgrindPid5 "\d\+5=" contained | |
42 syn match valgrindPid6 "\d\+6=" contained | |
43 syn match valgrindPid7 "\d\+7=" contained | |
44 syn match valgrindPid8 "\d\+8=" contained | |
45 syn match valgrindPid9 "\d\+9=" contained | |
46 | |
47 syn region valgrindLine | |
48 \ start=+\(^==\d\+== \)\@<=+ | |
49 \ end=+$+ | |
50 \ keepend | |
51 \ contained | |
52 \ contains=valgrindOptions,valgrindMsg,valgrindLoc | |
53 | |
54 syn match valgrindOptions "[ ]\{3}-.*$" contained | |
55 | |
56 syn match valgrindMsg "\S.*$" contained | |
57 \ contains=valgrindError,valgrindNote,valgrindSummary | |
58 syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained | |
59 syn match valgrindNote ".*still reachable.*" contained | |
60 syn match valgrindSummary ".*SUMMARY:" contained | |
61 | |
62 syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained | |
63 \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc | |
64 syn match valgrindAt "at\s\@=" contained | |
65 syn match valgrindAddr "\(\W\)\@<=0x\x\+" contained | |
66 syn match valgrindFunc "\(: \)\@<=\w\+" contained | |
67 syn match valgrindBin "\((\(with\|\)in \)\@<=\S\+\()\)\@=" contained | |
68 syn match valgrindSrc "\((\)\@<=.*:\d\+\()\)\@=" contained | |
69 | |
70 " Define the default highlighting | |
71 | |
72 hi def link valgrindSpecLine Type | |
73 "hi def link valgrindRegion Special | |
74 | |
75 hi def link valgrindPid0 Special | |
76 hi def link valgrindPid1 Comment | |
77 hi def link valgrindPid2 Type | |
78 hi def link valgrindPid3 Constant | |
79 hi def link valgrindPid4 Number | |
80 hi def link valgrindPid5 Identifier | |
81 hi def link valgrindPid6 Statement | |
82 hi def link valgrindPid7 Error | |
83 hi def link valgrindPid8 LineNr | |
84 hi def link valgrindPid9 Normal | |
85 "hi def link valgrindLine Special | |
86 | |
87 hi def link valgrindOptions Type | |
88 "hi def link valgrindMsg Special | |
89 "hi def link valgrindLoc Special | |
90 | |
91 hi def link valgrindError Special | |
92 hi def link valgrindNote Comment | |
93 hi def link valgrindSummary Type | |
94 | |
95 hi def link valgrindAt Special | |
96 hi def link valgrindAddr Number | |
97 hi def link valgrindFunc Type | |
98 hi def link valgrindBin Comment | |
99 hi def link valgrindSrc Statement | |
100 | |
101 let b:current_syntax = "valgrind" | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
102 |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
103 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
104 unlet s:keepcpo |