From b2c8b7327b0bad37ea16c73c4b07fd13d801bf42 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 3 May 2020 23:49:30 -0700 Subject: 6215 - show call stack in trace --- vimrc.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vimrc.vim b/vimrc.vim index 45e61f2d..76641e63 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -65,6 +65,10 @@ endif " see https://github.com/akkartik/mu/blob/master/Readme.md#a-few-hints-for-debugging command! -nargs=0 L exec "%!grep label |grep -v clear-stream:loop" +" show the call stack for the current line in the trace (by temporarily blowing away all earlier lines) +"? command! -nargs=0 C 1,.!awk '$4 == "label"{x[$1] = $0; for(i in x){if(i >= $1){delete x[i]}}} END{for (i in x) {if (i < $1) {print x[i]}}}' +command! -nargs=0 C 1,.!awk '{x[$1] = $0} END{for (i in x) {if (int(i) < int($1)) {print x[i]}}}' + " run test around cursor if empty($TMUX) " hack: need to move cursor outside function at start (`{`), but inside function at end (``) -- cgit 1.4.1-2-gfad0