Runner panes can be interupted with InterruptVimTmuxRunner

1.0.0rc1
benmills 12 years ago
parent a0db354ffa
commit 506f681a7a

@ -60,6 +60,16 @@ Close all other tmux panes in the current window.
map <Leader>rx :CloseVimTmuxWindows<CR>
```
### InterruptVimTmuxRunner
Interrupt any command that is running inside the runner pane.
*Example:*
```viml
" Interrupt any command running in the runner pane
map <Leader>rs :InspectVimTmuxRunner<CR>
```
### Full Example Code
```viml
@ -77,6 +87,9 @@ map <Leader>ri :InspectVimTmuxRunner<CR>
" Close all other tmux panes in current window
map <Leader>rx :CloseVimTmuxWindows<CR>
" Interrupt any command running in the runner pane
map <Leader>rs :InspectVimTmuxRunner<CR>
```
## Options
@ -94,5 +107,3 @@ let VimuxHeight = "50"
The features I would like to add in the near future.
* Add the ability to target any tmux session, window and pane
* Implment an interupt command that stops the currently running command
* Exit copy-mode before running a command

@ -5,6 +5,7 @@ end
command RunLastVimTmuxCommand :call RunLastVimTmuxCommand()
command CloseVimTmuxWindows :call CloseVimTmuxWindows()
command InspectVimTmuxRunner :call InspectVimTmuxRunner()
command InterruptVimTmuxRunner :call InterruptVimTmuxRunner()
command PromptVimTmuxCommand :call PromptVimTmuxCommand()
function! RunVimTmuxCommand(command)
@ -31,6 +32,10 @@ function! CloseVimTmuxWindows()
call ClearVimTmuxWindow()
endfunction
function! InterruptVimTmuxRunner()
ruby CurrentTmuxSession.new.interrupt_runner
endfunction
function! InspectVimTmuxRunner()
ruby CurrentTmuxSession.new.inspect_runner
endfunction
@ -110,6 +115,10 @@ class TmuxSession
runner_pane
end
def interrupt_runner
run("send-keys -t #{target(:pane => runner_pane)} ^c")
end
def run_shell_command(command)
send_command(command, target(:pane => runner_pane))
move_up_pane

Loading…
Cancel
Save