diff --git a/README.mkd b/README.mkd index c100441..91fb225 100644 --- a/README.mkd +++ b/README.mkd @@ -26,7 +26,7 @@ VTR, check [the included doc file][]. ## Installation -The easiest way to install VTR is to add the git repo as a bundle, then use +The easiest way to install VTR is to add the git repo as a bundle, then use [Pathogen][], [Vundle][] or similar plugin management option to add it to Vim's runtime path. diff --git a/doc/vim-tmux-runner.txt b/doc/vim-tmux-runner.txt index 377dd61..e7cb2a7 100644 --- a/doc/vim-tmux-runner.txt +++ b/doc/vim-tmux-runner.txt @@ -21,6 +21,7 @@ CONTENTS *vtr-contents* 2.11 ............................... |VtrClearRunner| 2.12 ............................... |VtrFlushCommand| 2.13 ............................... |VtrSendCtrlD| + 2.14 ............................... |VtrZoomRunnerPane| 3. Configuration ................... |VTR-Configuration| 3.1 ................................ |VtrPercentage| 3.2 ................................ |VtrOrientation| @@ -217,6 +218,15 @@ Send Ctrl-D key sequence to the runner without resetting the current command. This is useful if you are repeatedly running a script in the debugger and regularly need to kill the repl. +------------------------------------------------------------------------------ + *VtrZoomRunnerPane* +2.12 VtrZoomRunnerPane~ + +Zoom the runner pane using the native zooming functionality from tmux 1.8. +This will cause the runner pane to temporarily occupy the entire tmux window. +This is useful for temporarily viewing the pane in a larger context, ie to see +a long bracktrace. + ============================================================================== CONFIGURATION (3) *VTR-Configuration* diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index 6018772..2f0ce94 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -127,6 +127,12 @@ function! s:FocusRunnerPane() call s:FocusTmuxPane(s:runner_pane) endfunction +function! s:ZoomRunnerPane() + call s:EnsureRunnerPane() + let targeted_cmd = s:TargetedTmuxCommand("resize-pane -Z", s:runner_pane) + call s:SendTmuxCommand(targeted_cmd) +endfunction + function! s:SendTmuxCommand(command) let prefixed_command = "tmux " . a:command return system(prefixed_command) @@ -389,6 +395,7 @@ function! s:DefineCommands() command! VtrFlushCommand call s:FlushCommand() command! VtrSendCtrlD call s:SendCtrlD() command! VtrAttachToPane call s:AttachToPane() + command! VtrZoomRunnerPane call s:ZoomRunnerPane() endfunction function! s:DefineKeymaps() @@ -402,9 +409,9 @@ function! s:DefineKeymaps() nmap ,kr :VtrKillRunner nmap ,fr :VtrFocusRunner nmap ,dr :VtrDetachRunner - nmap ,ar :VtrReattachRunner nmap ,cr :VtrClearRunner nmap ,fc :VtrFlushCommand + nmap ,zr :VtrZoomRunnerPane endif endfunction