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 <leader>v1 :VtrAttachToPane 1 \| VtrSendLinesToRunner<cr>
nmap <leader>v2 :VtrAttachToPane 2 \| VtrSendLinesToRunner<cr>
```
This commit is contained in:
Chris Toomey 2018-11-04 15:01:50 -05:00
parent b9c630f882
commit 31f2a8aaa7

View File

@ -478,7 +478,7 @@ function! s:DefineCommands()
command! VtrClearRunner call s:SendClearSequence() command! VtrClearRunner call s:SendClearSequence()
command! VtrFlushCommand call s:FlushCommand() command! VtrFlushCommand call s:FlushCommand()
command! VtrSendCtrlD call s:SendCtrlD() command! VtrSendCtrlD call s:SendCtrlD()
command! -bang -nargs=? VtrAttachToPane call s:AttachToPane(<f-args>) command! -bang -nargs=? -bar VtrAttachToPane call s:AttachToPane(<f-args>)
endfunction endfunction
function! s:DefineKeymaps() function! s:DefineKeymaps()