Mercurial > vim
annotate runtime/syntax/valgrind.vim @ 6367:81c9b19ee0fb v7.4.516
updated for version 7.4.516
Problem: Completing a function name containing a # does not work. Issue
253.
Solution: Recognize the # character. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Nov 2014 20:09:06 +0100 |
parents | bd18da914be9 |
children | b0a227941705 |
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/ | |
6259 | 5 " Last Change: 2014 Oct 02 |
7 | 6 " |
7 " Notes: mostly based on strace.vim and xml.vim | |
6259 | 8 " |
9 " Contributors: Christoph Gysin <christoph.gysin@gmail.com> | |
7 | 10 |
11 " Quit when a syntax file was already loaded | |
12 if exists("b:current_syntax") | |
13 finish | |
14 endif | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
15 let s:keepcpo= &cpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
16 set cpo&vim |
7 | 17 |
18 syn case match | |
19 syn sync minlines=50 | |
20 | |
21 syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" | |
22 | |
23 syn region valgrindRegion | |
24 \ start=+^==\z(\d\+\)== \w.*$+ | |
25 \ skip=+^==\z1==\( \| .*\)$+ | |
26 \ end=+^+ | |
27 \ fold | |
28 \ keepend | |
29 \ contains=valgrindPidChunk,valgrindLine | |
30 | |
31 syn region valgrindPidChunk | |
32 \ start=+\(^==\)\@<=+ | |
33 \ end=+\(==\)\@=+ | |
34 \ contained | |
35 \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 | |
36 \ keepend | |
37 | |
38 syn match valgrindPid0 "\d\+0=" contained | |
39 syn match valgrindPid1 "\d\+1=" contained | |
40 syn match valgrindPid2 "\d\+2=" contained | |
41 syn match valgrindPid3 "\d\+3=" contained | |
42 syn match valgrindPid4 "\d\+4=" contained | |
43 syn match valgrindPid5 "\d\+5=" contained | |
44 syn match valgrindPid6 "\d\+6=" contained | |
45 syn match valgrindPid7 "\d\+7=" contained | |
46 syn match valgrindPid8 "\d\+8=" contained | |
47 syn match valgrindPid9 "\d\+9=" contained | |
48 | |
49 syn region valgrindLine | |
50 \ start=+\(^==\d\+== \)\@<=+ | |
51 \ end=+$+ | |
52 \ keepend | |
53 \ contained | |
54 \ contains=valgrindOptions,valgrindMsg,valgrindLoc | |
55 | |
56 syn match valgrindOptions "[ ]\{3}-.*$" contained | |
57 | |
58 syn match valgrindMsg "\S.*$" contained | |
59 \ contains=valgrindError,valgrindNote,valgrindSummary | |
60 syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained | |
61 syn match valgrindNote ".*still reachable.*" contained | |
62 syn match valgrindSummary ".*SUMMARY:" contained | |
63 | |
64 syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained | |
65 \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc | |
66 syn match valgrindAt "at\s\@=" contained | |
67 syn match valgrindAddr "\(\W\)\@<=0x\x\+" contained | |
68 syn match valgrindFunc "\(: \)\@<=\w\+" contained | |
69 syn match valgrindBin "\((\(with\|\)in \)\@<=\S\+\()\)\@=" contained | |
6259 | 70 syn match valgrindSrc "\((\)\@<=[^)]*:\d\+\()\)\@=" contained |
7 | 71 |
72 " Define the default highlighting | |
73 | |
74 hi def link valgrindSpecLine Type | |
75 "hi def link valgrindRegion Special | |
76 | |
77 hi def link valgrindPid0 Special | |
78 hi def link valgrindPid1 Comment | |
79 hi def link valgrindPid2 Type | |
80 hi def link valgrindPid3 Constant | |
81 hi def link valgrindPid4 Number | |
82 hi def link valgrindPid5 Identifier | |
83 hi def link valgrindPid6 Statement | |
84 hi def link valgrindPid7 Error | |
85 hi def link valgrindPid8 LineNr | |
86 hi def link valgrindPid9 Normal | |
87 "hi def link valgrindLine Special | |
88 | |
89 hi def link valgrindOptions Type | |
90 "hi def link valgrindMsg Special | |
91 "hi def link valgrindLoc Special | |
92 | |
93 hi def link valgrindError Special | |
94 hi def link valgrindNote Comment | |
95 hi def link valgrindSummary Type | |
96 | |
97 hi def link valgrindAt Special | |
98 hi def link valgrindAddr Number | |
99 hi def link valgrindFunc Type | |
100 hi def link valgrindBin Comment | |
101 hi def link valgrindSrc Statement | |
102 | |
103 let b:current_syntax = "valgrind" | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
104 |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
105 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
106 unlet s:keepcpo |