]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(strace): highlight stack trace as comment
authorJosef Schönberger <josef.schoenberger@tum.de>
Mon, 10 Aug 2026 18:58:53 +0000 (18:58 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 10 Aug 2026 19:02:15 +0000 (19:02 +0000)
strace supports printing a complete stack trace for each syscall using
the `-k` (`--stack-trace`) flag. Highlight the trace as a comment.

closes: #20998

Signed-off-by: Josef Schönberger <josef.schoenberger@tum.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/strace.vim

index 20516a18531521581a0fe7d27e8ab105efe18182..e4a64bee2ad6edfa67af22b8441a90b2ae356042 100644 (file)
@@ -2,6 +2,7 @@
 " Language: strace output
 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
 " Last Change: 2022 Jan 29
+" 2026 Aug 10 by Vim Project: highlight strack trace as comment #20998
 
 " Setup
 " quit when a syntax file was already loaded
@@ -29,11 +30,13 @@ syn match straceSysCallEmbed "\w\+" contained
 syn keyword stracePID pid contained
 syn match straceOperator "[-+=*/!%&|:,]"
 syn region straceComment start="/\*" end="\*/" oneline
+syn match straceStackTrace "^ *> .*$"
 
 " Define the default highlighting
 
 hi def link straceComment Comment
 hi def link straceVerbosed Comment
+hi def link straceStackTrace Comment
 hi def link stracePID PreProc
 hi def link straceNumber Number
 hi def link straceNumberRHS Type