diff --git a/doc/vimux.txt b/doc/vimux.txt index 25b74ea..61244ed 100644 --- a/doc/vimux.txt +++ b/doc/vimux.txt @@ -15,6 +15,7 @@ CONTENTS *vimux-contents* 2.5 .............................. |VimuxClosePanes| 2.6 .............................. |VimuxInterruptRunner| 2.7 .............................. |VimuxClearRunnerHistory| + 2.8 .............................. |VimuxZoomRunner| 3. Misc ............................ |VimuxMisc| 3.1 Example Keybinding............ |VimuxExampleKeybinding| 3.2 Tslime Replacement............ |VimuxTslimeReplacement| @@ -72,6 +73,7 @@ Furthermore there are several handy commands all starting with 'Vimux': - |VimuxInterruptRunner| - |VimuxPromptCommand| - |VimuxClearRunnerHistory| + - |VimuxZoomRunner| ------------------------------------------------------------------------------ *VimuxRunCommand* @@ -179,6 +181,18 @@ you enter tmux scroll mode inside the runner pane. map vc :VimuxClearRunnerHistory < +------------------------------------------------------------------------------ + *VimuxZoomRunner* +VimuxZoomRunner~ + +Zoom the runner pane. Once its zoomed, you will need +to use tmux " z" to restore the runner pane. +Zoom requires tmux version >= 1.8 +> + + " Zoom the tmux runner page + vz :VimuxZoomRunner +< ============================================================================== MISC (3) *VimuxMisc* @@ -193,18 +207,21 @@ Full Keybind Example~ " Prompt for a command to run map vp :VimuxPromptCommand - + " Run last command executed by VimuxRunCommand map vl :VimuxRunLastCommand - + " Inspect runner pane map vi :VimuxInspectRunner - + " Close vim tmux runner opened by VimuxRunCommand map vq :VimuxCloseRunner - + " Interrupt any command running in the runner pane map vx :VimuxInterruptRunner + + " Zoom the runner pane (use z to restore runner pane) + map vz :call VimuxZoomRunner() > ------------------------------------------------------------------------------ diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 0459b3b..3f65345 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -5,6 +5,7 @@ let g:loaded_vimux = 1 command VimuxRunLastCommand :call VimuxRunLastCommand() command VimuxCloseRunner :call VimuxCloseRunner() +command VimuxZoomRunner :call VimuxZoomRunner() command VimuxInspectRunner :call VimuxInspectRunner() command VimuxScrollUpInspect :call VimuxScrollUpInspect() command VimuxScrollDownInspect :call VimuxScrollDownInspect() @@ -74,6 +75,13 @@ function! VimuxCloseRunner() endif endfunction +function! VimuxZoomRunner() + if exists("g:VimuxRunnerPaneIndex") + call system("tmux resize-pane -Z -t ".g:VimuxRunnerPaneIndex) + unlet g:VimuxRunnerPaneIndex + endif +endfunction + function! VimuxInspectRunner() call system("tmux select-pane -t ".g:VimuxRunnerPaneIndex) call system("tmux copy-mode")