From 0430130f38ea1aa2907d25ade0d3fce7d0590a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemek=20R=C4=99kawiecki?= Date: Fri, 27 Dec 2013 21:07:39 +0100 Subject: [PATCH] FIXED :: issue when window is selected as a runner vimux will use available window or open a new one insted of always opening a new window and switching tmux back to a previous one --- doc/vimux.txt | 15 +++++++++++++++ plugin/vimux.vim | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/doc/vimux.txt b/doc/vimux.txt index c18d0c6..88f5600 100644 --- a/doc/vimux.txt +++ b/doc/vimux.txt @@ -314,5 +314,20 @@ the prompt and your input. Default: "Command? " +------------------------------------------------------------------------------ + VimuxRunnerType +2.5 g:VimuxRunnerType + +Deciedes what type of runner will be used by vimux when VimuxOpenPane is +launched. When "panel" is selected tmux window will be split and created pane +wil be used. If "window" is selected vimux will use whole open window - can be +useful if you dont want any splits and are ready to dedicate whole window to +vimux. + + let g:VimuxRunnerType = "pane" + +Available: "pane", "window" +Default: "pane" + ============================================================================== vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl: diff --git a/plugin/vimux.vim b/plugin/vimux.vim index a5e2c7f..06b621c 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -64,12 +64,12 @@ function! VimuxOpenRunner() let height = _VimuxOption("g:VimuxHeight", 20) let orientation = _VimuxOption("g:VimuxOrientation", "v") call system("tmux split-window -p ".height." -".orientation) + call system("tmux last-"._VimuxRunnerType()) elseif _VimuxRunnerType() == "window" call system("tmux new-window") endif let g:VimuxRunnerIndex = _VimuxTmuxIndex() - call system("tmux last-"._VimuxRunnerType()) endif endfunction