Skip to content

Commit a32acb1

Browse files
committed
New configuration option g:VimuxSocketPath
It allows to specify tmux socket path
1 parent ee3075a commit a32acb1

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

doc/vimux.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,5 +447,15 @@ previously-run commands in VimuxPromptCommand.
447447
<
448448
Default: 1
449449

450+
------------------------------------------------------------------------------
451+
*VimuxSocketPath*
452+
4.13 g:VimuxSocketPath~
453+
454+
The path to the tmux socket path. See tmux option `-S`
455+
>
456+
let g:VimuxSocketPath = "/path/to/tmux-socket"
457+
<
458+
Default: ""
459+
450460
==============================================================================
451461
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:

plugin/vimux.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,14 @@ function! VimuxPromptCommand(...)
188188
endfunction
189189

190190
function! VimuxTmux(arguments)
191+
let command = VimuxOption('VimuxTmuxCommand')
192+
if exists("g:VimuxSocketPath")
193+
let command .= ' -S ' . g:VimuxSocketPath
194+
endif
191195
if VimuxOption('VimuxDebug')
192-
echom VimuxOption('VimuxTmuxCommand').' '.a:arguments
196+
echom command.' '.a:arguments
193197
endif
194-
return system(VimuxOption('VimuxTmuxCommand').' '.a:arguments)
198+
return system(command.' '.a:arguments)
195199
endfunction
196200

197201
function! s:tmuxSession()

0 commit comments

Comments
 (0)