From 31f2a8aaa74f839d4263b8e4e3e3e868b2eb2aa0 Mon Sep 17 00:00:00 2001 From: Chris Toomey Date: Sun, 4 Nov 2018 15:01:50 -0500 Subject: [PATCH] Allow chaining commands after VtrAttachToPane Occasionally it can be useful to be able to interact with more than one REPL at a time. VTR doesn't have official support for this behavior, but we can combine the `VtrAttachToPane` command and the `VtrSendLinesToRunner` command to provide rough support for this. This change updates the `VtrAttachToPane` configuration to support this chaining. *Note* this mechanism will only allow for sending single lines. ``` vim nmap v1 :VtrAttachToPane 1 \| VtrSendLinesToRunner nmap v2 :VtrAttachToPane 2 \| VtrSendLinesToRunner ``` --- plugin/vim-tmux-runner.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index 04f2d46..4af8fc6 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -478,7 +478,7 @@ function! s:DefineCommands() command! VtrClearRunner call s:SendClearSequence() command! VtrFlushCommand call s:FlushCommand() command! VtrSendCtrlD call s:SendCtrlD() - command! -bang -nargs=? VtrAttachToPane call s:AttachToPane() + command! -bang -nargs=? -bar VtrAttachToPane call s:AttachToPane() endfunction function! s:DefineKeymaps()