strace.vim (2036B)
1 " Vim syntax file 2 " Language: strace output 3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> 4 " Last Change: 2022 Jan 29 5 " 2026 Aug 10 by Vim Project: highlight strack trace as comment #20998 6 7 " Setup 8 " quit when a syntax file was already loaded 9 if exists("b:current_syntax") 10 finish 11 endif 12 13 syn case match 14 15 " Parse the line 16 syn match straceSpecialChar "\\\o\{1,3}\|\\." contained 17 syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline 18 syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 19 syn match straceNumber "\W0x\x\+"lc=1 20 syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained 21 syn match straceOtherRHS "?" contained 22 syn match straceConstant "[A-Z_]\{2,}" 23 syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline 24 syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent 25 syn match straceEquals "\s=\s"ms=s+1,me=e-1 26 syn match straceParenthesis "[][(){}]" 27 syn match straceSysCall "^\w\+" 28 syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite 29 syn match straceSysCallEmbed "\w\+" contained 30 syn keyword stracePID pid contained 31 syn match straceOperator "[-+=*/!%&|:,]" 32 syn region straceComment start="/\*" end="\*/" oneline 33 syn match straceStackTrace "^ *> .*$" 34 35 " Define the default highlighting 36 37 hi def link straceComment Comment 38 hi def link straceVerbosed Comment 39 hi def link straceStackTrace Comment 40 hi def link stracePID PreProc 41 hi def link straceNumber Number 42 hi def link straceNumberRHS Type 43 hi def link straceOtherRHS Type 44 hi def link straceString String 45 hi def link straceConstant Function 46 hi def link straceEquals Type 47 hi def link straceSysCallEmbed straceSysCall 48 hi def link straceSysCall Statement 49 hi def link straceParenthesis Statement 50 hi def link straceOperator Normal 51 hi def link straceSpecialChar Special 52 hi def link straceOtherPID PreProc 53 54 55 let b:current_syntax = "strace"