Merge pull request #96 from jdavis/patch-1

Add documentation for VimuxRunnerType config variable
fix-tmux-next-3dot4
Ben Mills 10 years ago
commit cf6b8c08db

@ -110,7 +110,7 @@ VimuxOpenPane~
This will either open a new pane or use the nearest pane and set it as the This will either open a new pane or use the nearest pane and set it as the
vimux runner pane for the other vimux commands. You can control if this command vimux runner pane for the other vimux commands. You can control if this command
uses the nearest pane or always creates a new one with g:VimuxUseNearestPane uses the nearest pane or always creates a new one with g:VimuxUseNearest
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*VimuxPromptCommand* *VimuxPromptCommand*
@ -282,12 +282,13 @@ Options:
Default: "v" Default: "v"
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*VimuxConfiguration_use_nearest_pane* *VimuxConfiguration_use_nearest*
2.3 g:VimuxUseNearestPane~ 2.3 g:VimuxUseNearest
Use exising pane (not used by vim) if found instead of running split-window. Use exising pane or window (not used by vim) if found instead of running
split-window.
let VimuxUseNearestPane = 1 let VimuxUseNearest = 1
Default: 1 Default: 1
@ -314,5 +315,20 @@ the prompt and your input.
Default: "Command? " Default: "Command? "
------------------------------------------------------------------------------
*VimuxRunnerType*
2.6 g:VimuxRunnerType~
The type of view object Vimux should use for the runner. For reference, a
tmux session is a group of windows, and a window is a layout of panes.
let g:VimuxRunnerType = "window"
Options:
"pane": for panes
"window": for windows
Default: "pane"
============================================================================== ==============================================================================
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl: vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:

@ -156,11 +156,11 @@ function! _VimuxTmuxWindowIndex()
endfunction endfunction
function! _VimuxNearestIndex() function! _VimuxNearestIndex()
let panes = split(system("tmux list-"._VimuxRunnerType()."s"), "\n") let views = split(system("tmux list-"._VimuxRunnerType()."s"), "\n")
for pane in panes for view in views
if match(pane, "(active)") == -1 if match(view, "(active)") != -1
return split(pane, ":")[0] return split(view, ":")[0]
endif endif
endfor endfor

Loading…
Cancel
Save