diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-05-03 23:49:30 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-05-03 23:49:30 -0700 |
commit | b2c8b7327b0bad37ea16c73c4b07fd13d801bf42 (patch) | |
tree | 9b373457da01614aa89735c50393b456806229eb | |
parent | 6c29edc726cd17880bd887dd2d69e8a9700583ac (diff) | |
download | mu-b2c8b7327b0bad37ea16c73c4b07fd13d801bf42.tar.gz |
6215 - show call stack in trace
-rw-r--r-- | vimrc.vim | 4 |
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>`) |