Skip to content

Commit 635b800

Browse files
committed
add VimuxZoomRunner() to zoom the runner pane on Tmux 1.8
1 parent 0228508 commit 635b800

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

doc/vimux.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CONTENTS *vimux-contents*
1515
2.5 .............................. |VimuxClosePanes|
1616
2.6 .............................. |VimuxInterruptRunner|
1717
2.7 .............................. |VimuxClearRunnerHistory|
18+
2.8 .............................. |VimuxZoomRunner|
1819
3. Misc ............................ |VimuxMisc|
1920
3.1 Example Keybinding............ |VimuxExampleKeybinding|
2021
3.2 Tslime Replacement............ |VimuxTslimeReplacement|
@@ -72,6 +73,7 @@ Furthermore there are several handy commands all starting with 'Vimux':
7273
- |VimuxInterruptRunner|
7374
- |VimuxPromptCommand|
7475
- |VimuxClearRunnerHistory|
76+
- |VimuxZoomRunner|
7577

7678
------------------------------------------------------------------------------
7779
*VimuxRunCommand*
@@ -179,6 +181,18 @@ you enter tmux scroll mode inside the runner pane.
179181
<Leader>vc :VimuxClearRunnerHistory<CR>
180182
<
181183

184+
------------------------------------------------------------------------------
185+
*VimuxZoomRunner*
186+
VimuxZoomRunner~
187+
188+
Zoom the runner pane. Once its zoomed, you will need
189+
to use tmux "<bind-key> z" to restore the runner pane.
190+
Zoom requires tmux version >= 1.8
191+
>
192+
193+
" Zoom the tmux runner page
194+
<Leader>vz :VimuxZoomRunner<CR>
195+
<
182196

183197
==============================================================================
184198
MISC (3) *VimuxMisc*
@@ -193,18 +207,21 @@ Full Keybind Example~
193207
194208
" Prompt for a command to run
195209
map <Leader>vp :VimuxPromptCommand<CR>
196-
210+
197211
" Run last command executed by VimuxRunCommand
198212
map <Leader>vl :VimuxRunLastCommand<CR>
199-
213+
200214
" Inspect runner pane
201215
map <Leader>vi :VimuxInspectRunner<CR>
202-
216+
203217
" Close vim tmux runner opened by VimuxRunCommand
204218
map <Leader>vq :VimuxCloseRunner<CR>
205-
219+
206220
" Interrupt any command running in the runner pane
207221
map <Leader>vx :VimuxInterruptRunner<CR>
222+
223+
" Zoom the runner pane (use <bind-key> z to restore runner pane)
224+
map <Leader>vz :call VimuxZoomRunner()<CR>
208225
>
209226
210227
------------------------------------------------------------------------------

plugin/vimux.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ let g:loaded_vimux = 1
55

66
command VimuxRunLastCommand :call VimuxRunLastCommand()
77
command VimuxCloseRunner :call VimuxCloseRunner()
8+
command VimuxZoomRunner :call VimuxZoomRunner()
89
command VimuxInspectRunner :call VimuxInspectRunner()
910
command VimuxScrollUpInspect :call VimuxScrollUpInspect()
1011
command VimuxScrollDownInspect :call VimuxScrollDownInspect()
@@ -74,6 +75,13 @@ function! VimuxCloseRunner()
7475
endif
7576
endfunction
7677

78+
function! VimuxZoomRunner()
79+
if exists("g:VimuxRunnerPaneIndex")
80+
call system("tmux resize-pane -Z -t ".g:VimuxRunnerPaneIndex)
81+
unlet g:VimuxRunnerPaneIndex
82+
endif
83+
endfunction
84+
7785
function! VimuxInspectRunner()
7886
call system("tmux select-pane -t ".g:VimuxRunnerPaneIndex)
7987
call system("tmux copy-mode")

0 commit comments

Comments
 (0)