@@ -51,7 +51,7 @@ function! VimuxRunLastCommand()
51
51
endfunction
52
52
53
53
function ! VimuxRunCommand (command , ... )
54
- if ! exists (' g:VimuxRunnerIndex' ) || s: VimuxHasRunner (g: VimuxRunnerIndex ) == -1
54
+ if ! exists (' g:VimuxRunnerIndex' ) || s: VimuxHasRunner (g: VimuxRunnerIndex ) == # -1
55
55
call VimuxOpenRunner ()
56
56
endif
57
57
@@ -66,7 +66,7 @@ function! VimuxRunCommand(command, ...)
66
66
call VimuxSendKeys (resetSequence)
67
67
call VimuxSendText (a: command )
68
68
69
- if l: autoreturn == 1
69
+ if l: autoreturn == # 1
70
70
call VimuxSendKeys (' Enter' )
71
71
endif
72
72
endfunction
@@ -86,15 +86,15 @@ endfunction
86
86
function ! VimuxOpenRunner ()
87
87
let nearestIndex = s: VimuxNearestIndex ()
88
88
89
- if s: VimuxOption (' g:VimuxUseNearest' , 1 ) == 1 && nearestIndex != -1
89
+ if s: VimuxOption (' g:VimuxUseNearest' , 1 ) == # 1 && nearestIndex != -1
90
90
let g: VimuxRunnerIndex = nearestIndex
91
91
else
92
92
let extraArguments = s: VimuxOption (' g:VimuxOpenExtraArgs' , ' ' )
93
- if s: VimuxRunnerType () == ' pane'
93
+ if s: VimuxRunnerType () == # ' pane'
94
94
let height = s: VimuxOption (' g:VimuxHeight' , 20 )
95
95
let orientation = s: VimuxOption (' g:VimuxOrientation' , ' v' )
96
96
call s: VimuxTmux (' split-window -p ' .height.' -' .orientation.' ' .extraArguments)
97
- elseif s: VimuxRunnerType () == ' window'
97
+ elseif s: VimuxRunnerType () == # ' window'
98
98
call s: VimuxTmux (' new-window ' .extraArguments)
99
99
endif
100
100
@@ -113,10 +113,10 @@ endfunction
113
113
114
114
function ! VimuxTogglePane ()
115
115
if exists (' g:VimuxRunnerIndex' )
116
- if s: VimuxRunnerType () == ' window'
116
+ if s: VimuxRunnerType () == # ' window'
117
117
call s: VimuxTmux (' join-pane -d -s ' .g: VimuxRunnerIndex .' -p ' .s: VimuxOption (' g:VimuxHeight' , 20 ))
118
118
let g: VimuxRunnerType = ' pane'
119
- elseif s: VimuxRunnerType () == ' pane'
119
+ elseif s: VimuxRunnerType () == # ' pane'
120
120
let g: VimuxRunnerIndex= substitute (s: VimuxTmux (' break-pane -d -t ' .g: VimuxRunnerIndex ." -P -F '#{window_id}'" ), ' \n' , ' ' , ' ' )
121
121
let g: VimuxRunnerType = ' window'
122
122
endif
@@ -125,9 +125,9 @@ endfunction
125
125
126
126
function ! VimuxZoomRunner ()
127
127
if exists (' g:VimuxRunnerIndex' )
128
- if s: VimuxRunnerType () == ' pane'
128
+ if s: VimuxRunnerType () == # ' pane'
129
129
call s: VimuxTmux (' resize-pane -Z -t ' .g: VimuxRunnerIndex )
130
- elseif s: VimuxRunnerType () == ' window'
130
+ elseif s: VimuxRunnerType () == # ' window'
131
131
call s: VimuxTmux (' select-window -t ' .g: VimuxRunnerIndex )
132
132
endif
133
133
endif
@@ -167,7 +167,7 @@ function! VimuxClearRunnerHistory()
167
167
endfunction
168
168
169
169
function ! VimuxPromptCommand (... )
170
- let command = a: 0 == 1 ? a: 1 : ' '
170
+ let command = a: 0 == # 1 ? a: 1 : ' '
171
171
let l: command = input (s: VimuxOption (' g:VimuxPromptString' , ' Command? ' ), command , ' shellcmd' )
172
172
call VimuxRunCommand (l: command )
173
173
endfunction
@@ -184,7 +184,7 @@ function! s:VimuxTmuxSession()
184
184
endfunction
185
185
186
186
function ! s: VimuxTmuxIndex ()
187
- if s: VimuxRunnerType () == ' pane'
187
+ if s: VimuxRunnerType () == # ' pane'
188
188
return s: VimuxTmuxPaneId ()
189
189
else
190
190
return s: VimuxTmuxWindowId ()
@@ -205,7 +205,7 @@ function! s:VimuxNearestIndex()
205
205
let views = split (s: VimuxTmux (' list-' .t ." s -F '#{" .t .' _active}:#{' .t ." _id}'" .filter ), ' \n' )
206
206
207
207
for view in views
208
- if match (view , ' 1:' ) == -1
208
+ if match (view , ' 1:' ) == # -1
209
209
return split (view , ' :' )[1 ]
210
210
endif
211
211
endfor
@@ -215,26 +215,26 @@ endfunction
215
215
216
216
function ! s: VimuxGetTargetFilter ()
217
217
let targetName = s: VimuxOption (' g:VimuxRunnerName' , ' ' )
218
- if targetName == ' '
218
+ if targetName == # ' '
219
219
return ' '
220
220
endif
221
221
let t = s: VimuxRunnerType ()
222
- if t == ' window'
222
+ if t == # ' window'
223
223
return " -f '#{==:#{window_name}," .targetName." }'"
224
- elseif t == ' pane'
224
+ elseif t == # ' pane'
225
225
return " -f '#{==:#{pane_title}," .targetName." }'"
226
226
endif
227
227
endfunction
228
228
229
229
function ! s: VimuxSetRunnerName ()
230
230
let targetName = s: VimuxOption (' g:VimuxRunnerName' , ' ' )
231
- if targetName == ' '
231
+ if targetName == # ' '
232
232
return
233
233
endif
234
234
let t = s: VimuxRunnerType ()
235
- if t == ' window'
235
+ if t == # ' window'
236
236
call s: VimuxTmux (' rename-window ' .targetName)
237
- elseif t == ' pane'
237
+ elseif t == # ' pane'
238
238
call s: VimuxTmux (' select-pane -T ' .targetName)
239
239
endif
240
240
endfunction
0 commit comments