about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--vimrc.vim4
1 files changed, 4 insertions, 0 deletions
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 (`<C-o>`)