diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-09-07 16:43:45 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-09-07 16:43:45 -0700 |
commit | 82b958685cd89b5df8b358974fd34231b54f97c1 (patch) | |
tree | 69f51543a466d1690dfdf73bd7ea4169ff8889e6 | |
parent | 2844327aa793ab57650410f59d334b90aad2103b (diff) | |
download | mu-82b958685cd89b5df8b358974fd34231b54f97c1.tar.gz |
5640
-rw-r--r-- | vimrc.vim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vimrc.vim b/vimrc.vim index 445abbd3..8b88cfc3 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -87,11 +87,13 @@ if empty($TMUX) " cursor on '#' causes error noremap <Leader>t {j0:call RunTestMoveCursor("<C-r><C-w>")<CR> function RunTestMoveCursor(arg) - exec "!./run_one_test ".expand("%")." ".a:arg + let l:arg = a:arg == "#" ? " " : a:arg " Vim's '!' insists on interpreting '#' anywhere in its arg + exec "!./run_one_test ".expand("%")." ".l:arg exec "normal \<C-o>" endfunction function RunTestMoveCursorAndMaybeOpenTrace(arg) - exec "!./run_one_test ".expand("%")." ".a:arg + let l:arg = a:arg == "#" ? " " : a:arg " Vim's '!' insists on interpreting '#' anywhere in its arg + exec "!./run_one_test ".expand("%")." ".l:arg exec "normal \<C-o>" if v:shell_error noautocmd vertical split last_run @@ -102,7 +104,8 @@ else " assume the left-most window is for the shell noremap <Leader>t {j0:silent! call RunTestInFirstPane("<C-r><C-w>")<CR><C-o> function RunTestInFirstPane(arg) - call RunInFirstPane("./run_one_test ".expand("%")." ".a:arg) + let l:arg = a:arg == "#" ? " " : a:arg " Vim's '!' insists on interpreting '#' anywhere in its arg + call RunInFirstPane("./run_one_test ".expand("%")." ".l:arg) endfunction function RunInFirstPane(arg) exec "!tmux select-pane -t :0.0" |