Mercurial > vim
annotate runtime/syntax/valgrind.vim @ 29479:5c390aa28f44 v9.0.0081
patch 9.0.0081: command line completion of user command may have duplicates
Commit: https://github.com/vim/vim/commit/c2842adfb2ca0637f13e2793fefa18e7818684f9
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 26 17:23:47 2022 +0100
patch 9.0.0081: command line completion of user command may have duplicates
Problem: Command line completion of user command may have duplicates.
(Dani Dickstein)
Solution: Skip global user command if an identical buffer-local one is
defined. (closes #10797)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 26 Jul 2022 18:30:03 +0200 |
parents | 2704c4e3e20a |
children |
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/ | |
17571 | 5 " Last Change: 2019 Jul 24 |
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 |
6583 | 18 " Lines can be long with demangled c++ functions. |
19 setlocal synmaxcol=8000 | |
20 | |
7 | 21 syn case match |
22 syn sync minlines=50 | |
23 | |
24 syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" | |
25 | |
26 syn region valgrindRegion | |
27 \ start=+^==\z(\d\+\)== \w.*$+ | |
17571 | 28 \ skip=+^==\z1==\( \| .*\| \S.*\)$+ |
7 | 29 \ end=+^+ |
30 \ fold | |
31 \ keepend | |
32 \ contains=valgrindPidChunk,valgrindLine | |
33 | |
34 syn region valgrindPidChunk | |
6583 | 35 \ start=+^==\zs+ |
36 \ end=+\ze==+ | |
7 | 37 \ contained |
38 \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 | |
39 \ keepend | |
40 | |
41 syn match valgrindPid0 "\d\+0=" contained | |
42 syn match valgrindPid1 "\d\+1=" contained | |
43 syn match valgrindPid2 "\d\+2=" contained | |
44 syn match valgrindPid3 "\d\+3=" contained | |
45 syn match valgrindPid4 "\d\+4=" contained | |
46 syn match valgrindPid5 "\d\+5=" contained | |
47 syn match valgrindPid6 "\d\+6=" contained | |
48 syn match valgrindPid7 "\d\+7=" contained | |
49 syn match valgrindPid8 "\d\+8=" contained | |
50 syn match valgrindPid9 "\d\+9=" contained | |
51 | |
52 syn region valgrindLine | |
53 \ start=+\(^==\d\+== \)\@<=+ | |
54 \ end=+$+ | |
55 \ keepend | |
56 \ contained | |
57 \ contains=valgrindOptions,valgrindMsg,valgrindLoc | |
58 | |
59 syn match valgrindOptions "[ ]\{3}-.*$" contained | |
60 | |
61 syn match valgrindMsg "\S.*$" contained | |
62 \ contains=valgrindError,valgrindNote,valgrindSummary | |
63 syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained | |
64 syn match valgrindNote ".*still reachable.*" contained | |
65 syn match valgrindSummary ".*SUMMARY:" contained | |
66 | |
67 syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained | |
68 \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc | |
69 syn match valgrindAt "at\s\@=" contained | |
6583 | 70 syn match valgrindAddr "\W\zs0x\x\+" contained |
71 | |
17571 | 72 syn match valgrindFunc ": \zs\h[a-zA-Z0-9_:\[\]()<>&*+\-,=%!|^ @.]*\ze([^)]*)$" contained |
6583 | 73 syn match valgrindBin "(\(with\)\=in \zs\S\+)\@=" contained |
74 syn match valgrindSrc "(\zs[^)]*:\d\+)\@=" contained | |
7 | 75 |
76 " Define the default highlighting | |
77 | |
78 hi def link valgrindSpecLine Type | |
79 "hi def link valgrindRegion Special | |
80 | |
81 hi def link valgrindPid0 Special | |
82 hi def link valgrindPid1 Comment | |
83 hi def link valgrindPid2 Type | |
84 hi def link valgrindPid3 Constant | |
85 hi def link valgrindPid4 Number | |
86 hi def link valgrindPid5 Identifier | |
87 hi def link valgrindPid6 Statement | |
88 hi def link valgrindPid7 Error | |
89 hi def link valgrindPid8 LineNr | |
90 hi def link valgrindPid9 Normal | |
91 "hi def link valgrindLine Special | |
92 | |
93 hi def link valgrindOptions Type | |
94 "hi def link valgrindMsg Special | |
95 "hi def link valgrindLoc Special | |
96 | |
97 hi def link valgrindError Special | |
98 hi def link valgrindNote Comment | |
99 hi def link valgrindSummary Type | |
100 | |
101 hi def link valgrindAt Special | |
102 hi def link valgrindAddr Number | |
103 hi def link valgrindFunc Type | |
104 hi def link valgrindBin Comment | |
105 hi def link valgrindSrc Statement | |
106 | |
107 let b:current_syntax = "valgrind" | |
3496
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
108 |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
109 let &cpo = s:keepcpo |
d1e4abe8342c
Fixed compatible mode in most runtime files.
Bram Moolenaar <bram@vim.org>
parents:
7
diff
changeset
|
110 unlet s:keepcpo |