@@ -73,7 +73,7 @@ endfunction
73
73
74
74
function ! VimuxSendKeys (keys )
75
75
if exists (' g:VimuxRunnerIndex' )
76
- call s: tmux (' send-keys -t ' .g: VimuxRunnerIndex .' ' .a: keys )
76
+ call VimuxTmux (' send-keys -t ' .g: VimuxRunnerIndex .' ' .a: keys )
77
77
else
78
78
echo ' No vimux runner pane/window. Create one with VimuxOpenRunner'
79
79
endif
@@ -88,30 +88,30 @@ function! VimuxOpenRunner()
88
88
if s: runnerType () == # ' pane'
89
89
let height = VimuxOption (' g:VimuxHeight' , 20 )
90
90
let orientation = VimuxOption (' g:VimuxOrientation' , ' v' )
91
- call s: tmux (' split-window -p ' .height.' -' .orientation.' ' .extraArguments)
91
+ call VimuxTmux (' split-window -p ' .height.' -' .orientation.' ' .extraArguments)
92
92
elseif s: runnerType () == # ' window'
93
- call s: tmux (' new-window ' .extraArguments)
93
+ call VimuxTmux (' new-window ' .extraArguments)
94
94
endif
95
95
let g: VimuxRunnerIndex = s: tmuxIndex ()
96
96
call s: setRunnerName ()
97
- call s: tmux (' last-' .s: runnerType ())
97
+ call VimuxTmux (' last-' .s: runnerType ())
98
98
endif
99
99
endfunction
100
100
101
101
function ! VimuxCloseRunner ()
102
102
if exists (' g:VimuxRunnerIndex' )
103
- call s: tmux (' kill-' .s: runnerType ().' -t ' .g: VimuxRunnerIndex )
103
+ call VimuxTmux (' kill-' .s: runnerType ().' -t ' .g: VimuxRunnerIndex )
104
104
unlet g: VimuxRunnerIndex
105
105
endif
106
106
endfunction
107
107
108
108
function ! VimuxTogglePane ()
109
109
if exists (' g:VimuxRunnerIndex' )
110
110
if s: runnerType () == # ' window'
111
- call s: tmux (' join-pane -d -s ' .g: VimuxRunnerIndex .' -p ' .VimuxOption (' g:VimuxHeight' , 20 ))
111
+ call VimuxTmux (' join-pane -d -s ' .g: VimuxRunnerIndex .' -p ' .VimuxOption (' g:VimuxHeight' , 20 ))
112
112
let g: VimuxRunnerType = ' pane'
113
113
elseif s: runnerType () == # ' pane'
114
- let g: VimuxRunnerIndex= substitute (s: tmux (' break-pane -d -t ' .g: VimuxRunnerIndex ." -P -F '#{window_id}'" ), ' \n' , ' ' , ' ' )
114
+ let g: VimuxRunnerIndex= substitute (VimuxTmux (' break-pane -d -t ' .g: VimuxRunnerIndex ." -P -F '#{window_id}'" ), ' \n' , ' ' , ' ' )
115
115
let g: VimuxRunnerType = ' window'
116
116
endif
117
117
endif
@@ -120,27 +120,27 @@ endfunction
120
120
function ! VimuxZoomRunner ()
121
121
if exists (' g:VimuxRunnerIndex' )
122
122
if s: runnerType () == # ' pane'
123
- call s: tmux (' resize-pane -Z -t ' .g: VimuxRunnerIndex )
123
+ call VimuxTmux (' resize-pane -Z -t ' .g: VimuxRunnerIndex )
124
124
elseif s: runnerType () == # ' window'
125
- call s: tmux (' select-window -t ' .g: VimuxRunnerIndex )
125
+ call VimuxTmux (' select-window -t ' .g: VimuxRunnerIndex )
126
126
endif
127
127
endif
128
128
endfunction
129
129
130
130
function ! VimuxInspectRunner ()
131
- call s: tmux (' select-' .s: runnerType ().' -t ' .g: VimuxRunnerIndex )
132
- call s: tmux (' copy-mode' )
131
+ call VimuxTmux (' select-' .s: runnerType ().' -t ' .g: VimuxRunnerIndex )
132
+ call VimuxTmux (' copy-mode' )
133
133
endfunction
134
134
135
135
function ! VimuxScrollUpInspect ()
136
136
call VimuxInspectRunner ()
137
- call s: tmux (' last-' .s: runnerType ())
137
+ call VimuxTmux (' last-' .s: runnerType ())
138
138
call VimuxSendKeys (' C-u' )
139
139
endfunction
140
140
141
141
function ! VimuxScrollDownInspect ()
142
142
call VimuxInspectRunner ()
143
- call s: tmux (' last-' .s: runnerType ())
143
+ call VimuxTmux (' last-' .s: runnerType ())
144
144
call VimuxSendKeys (' C-d' )
145
145
endfunction
146
146
@@ -156,7 +156,7 @@ endfunction
156
156
157
157
function ! VimuxClearRunnerHistory ()
158
158
if exists (' g:VimuxRunnerIndex' )
159
- call s: tmux (' clear-history -t ' .g: VimuxRunnerIndex )
159
+ call VimuxTmux (' clear-history -t ' .g: VimuxRunnerIndex )
160
160
endif
161
161
endfunction
162
162
@@ -166,7 +166,7 @@ function! VimuxPromptCommand(...)
166
166
call VimuxRunCommand (l: command )
167
167
endfunction
168
168
169
- function ! s: tmux (arguments)
169
+ function ! VimuxTmux (arguments)
170
170
if VimuxOption (' g:VimuxDebug' , 0 ) != 0
171
171
echom s: tmuxCmd ().' ' .a: arguments
172
172
endif
@@ -196,7 +196,7 @@ endfunction
196
196
function ! s: nearestIndex ()
197
197
let t = s: runnerType ()
198
198
let filter = s: getTargetFilter ()
199
- let views = split (s: tmux (' list-' .t ." s -F '#{" .t .' _active}:#{' .t ." _id}'" .filter ), ' \n' )
199
+ let views = split (VimuxTmux (' list-' .t ." s -F '#{" .t .' _active}:#{' .t ." _id}'" .filter ), ' \n' )
200
200
for view in views
201
201
if match (view , ' 1:' ) == # -1
202
202
return split (view , ' :' )[1 ]
@@ -225,9 +225,9 @@ function! s:setRunnerName()
225
225
endif
226
226
let t = s: runnerType ()
227
227
if t == # ' window'
228
- call s: tmux (' rename-window ' .targetName)
228
+ call VimuxTmux (' rename-window ' .targetName)
229
229
elseif t == # ' pane'
230
- call s: tmux (' select-pane -T ' .targetName)
230
+ call VimuxTmux (' select-pane -T ' .targetName)
231
231
endif
232
232
endfunction
233
233
@@ -236,10 +236,10 @@ function! s:runnerType()
236
236
endfunction
237
237
238
238
function ! s: tmuxProperty (property)
239
- return substitute (s: tmux (" display -p '" .a: property ." '" ), ' \n$' , ' ' , ' ' )
239
+ return substitute (VimuxTmux (" display -p '" .a: property ." '" ), ' \n$' , ' ' , ' ' )
240
240
endfunction
241
241
242
242
function ! s: hasRunner (index )
243
243
let t = s: runnerType ()
244
- return match (s: tmux (' list-' .t ." s -F '#{" .t ." _id}'" ), a: index )
244
+ return match (VimuxTmux (' list-' .t ." s -F '#{" .t ." _id}'" ), a: index )
245
245
endfunction
0 commit comments