From fb486dcfed7bf3a936cef43ec8253af277f34b5a Mon Sep 17 00:00:00 2001 From: Chris Toomey Date: Fri, 11 Apr 2014 13:50:25 -0400 Subject: [PATCH] Use maps. Not sure how this lasted so long... --- doc/vim-tmux-runner.txt | 5 +++++ plugin/vim-tmux-runner.vim | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/doc/vim-tmux-runner.txt b/doc/vim-tmux-runner.txt index e7cb2a7..b60b3da 100644 --- a/doc/vim-tmux-runner.txt +++ b/doc/vim-tmux-runner.txt @@ -227,6 +227,11 @@ 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. +You can add the following mapping to your ~/.tmux.conf file to enable quick +toggling of the zoom functionality: + + bind C-p run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys ':VtrZoomRunnerPane' 'C-m') || tmux select-pane -l" + ============================================================================== CONFIGURATION (3) *VTR-Configuration* diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index 2f0ce94..debd2e6 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -400,18 +400,18 @@ endfunction function! s:DefineKeymaps() if g:VtrUseVtrMaps - nmap ,rr :VtrResizeRunner - nmap ,ror :VtrReorientRunner - nmap ,sc :VtrSendCommandToRunner - nmap ,sl :VtrSendLineToRunner - vmap ,sv :VtrSendSelectedToRunner - nmap ,or :VtrOpenRunner - nmap ,kr :VtrKillRunner - nmap ,fr :VtrFocusRunner - nmap ,dr :VtrDetachRunner - nmap ,cr :VtrClearRunner - nmap ,fc :VtrFlushCommand - nmap ,zr :VtrZoomRunnerPane + nmap rr :VtrResizeRunner + nmap ror :VtrReorientRunner + nmap sc :VtrSendCommandToRunner + nmap sl :VtrSendLineToRunner + vmap sv :VtrSendSelectedToRunner + nmap or :VtrOpenRunner + nmap kr :VtrKillRunner + nmap fr :VtrFocusRunner + nmap dr :VtrDetachRunner + nmap cr :VtrClearRunner + nmap fc :VtrFlushCommand + nmap zr :VtrZoomRunnerPane endif endfunction