Merge pull request #174 from mvanderkamp/split-extra-args

pull/180/head
Caleb Maclennan 3 years ago committed by GitHub
commit 71f28c8296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -375,5 +375,17 @@ redefine this if you're using something like tmate.
Default: "tmux"
------------------------------------------------------------------------------
*VimuxOpenExtraArgs*
2.8 g:VimuxOpenExtraArgs~
Allows addtional arguments to be passed to the tmux command that opens the
runner. Make sure that the arguments specified are valid depending on whether
you're using panes or windows, and your version of tmux.
let g:VimuxOpenExtraArgs = "-c #{pane_current_path}"
Default: "tmux"
==============================================================================
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:

@ -14,6 +14,7 @@ endif
command -nargs=* VimuxRunCommand :call VimuxRunCommand(<args>)
command VimuxRunLastCommand :call VimuxRunLastCommand()
command VimuxOpenRunner :call VimuxOpenRunner()
command VimuxCloseRunner :call VimuxCloseRunner()
command VimuxZoomRunner :call VimuxZoomRunner()
command VimuxInspectRunner :call VimuxInspectRunner()
@ -80,12 +81,13 @@ function! VimuxOpenRunner()
if _VimuxOption("g:VimuxUseNearest", 1) == 1 && nearestIndex != -1
let g:VimuxRunnerIndex = nearestIndex
else
let extraArguments = _VimuxOption("g:VimuxOpenExtraArgs", "")
if _VimuxRunnerType() == "pane"
let height = _VimuxOption("g:VimuxHeight", 20)
let orientation = _VimuxOption("g:VimuxOrientation", "v")
call _VimuxTmux("split-window -p ".height." -".orientation)
call _VimuxTmux("split-window -p ".height." -".orientation." ".extraArguments)
elseif _VimuxRunnerType() == "window"
call _VimuxTmux("new-window")
call _VimuxTmux("new-window ".extraArguments)
endif
let g:VimuxRunnerIndex = _VimuxTmuxIndex()

Loading…
Cancel
Save