Merge pull request #18 from tonyskn/closeRunnerOnly

Add `CloseVimTmuxRunner` command
1.0.0rc1
Ben Mills 12 years ago
commit 39678261e9

@ -56,6 +56,14 @@ Move into the tmux runner pane created by `RunVimTmuxCommand` and enter copy mod
map <Leader>ri :InspectVimTmuxRunner<CR>
```
### CloseVimTmuxRunner
Close the tmux runner created by `RunVimTmuxCommand`
```viml
" Close vim tmux runner opened by RunVimTmuxCommand
map <Leader>rq :CloseVimTmuxRunner<CR>
```
### CloseVimTmuxPanes
Close all other tmux panes in the current window.
@ -90,6 +98,9 @@ map <Leader>ri :InspectVimTmuxRunner<CR>
" Close all other tmux panes in current window
map <Leader>rx :CloseVimTmuxPanes<CR>
" Close vim tmux runner opened by RunVimTmuxCommand
map <Leader>rq :CloseVimTmuxRunner<CR>
" Interrupt any command running in the runner pane
map <Leader>rs :InterruptVimTmuxRunner<CR>
```

@ -8,6 +8,7 @@ if !has("ruby")
end
command RunLastVimTmuxCommand :call RunLastVimTmuxCommand()
command CloseVimTmuxRunner :call CloseVimTmuxRunner()
command CloseVimTmuxPanes :call CloseVimTmuxPanes()
command CloseVimTmuxWindows :call CloseVimTmuxWindows()
command InspectVimTmuxRunner :call InspectVimTmuxRunner()
@ -50,6 +51,11 @@ function CloseVimTmuxWindows()
echoerr "CloseVimTmuxWindows is deprecated, use CloseVimTmuxPanes"
endfunction
function CloseVimTmuxRunner()
ruby CurrentTmuxSession.new.close_runner_pane
call ClearVimTmuxWindow()
endfunction
function CloseVimTmuxPanes()
ruby CurrentTmuxSession.new.close_other_panes
call ClearVimTmuxWindow()
@ -169,6 +175,10 @@ class TmuxSession
_move_up_pane
end
def close_runner_pane
_run("kill-pane -t #{target(:pane => runner_pane)}")
end
def close_other_panes
if _run("list-panes").split("\n").length > 1
_run("kill-pane -a")

Loading…
Cancel
Save