@@ -3,7 +3,7 @@ if exists('g:loaded_vimux') || &compatible
3
3
endif
4
4
let g: loaded_vimux = 1
5
5
6
- function ! s: VimuxOption (option , default)
6
+ function ! VimuxOption (option , default)
7
7
if exists (a: option )
8
8
return eval (a: option )
9
9
else
@@ -12,7 +12,7 @@ function! s:VimuxOption(option, default)
12
12
endfunction
13
13
14
14
function ! s: VimuxTmuxCmd ()
15
- return s: VimuxOption (' g:VimuxTmuxCommand' , ' tmux' )
15
+ return VimuxOption (' g:VimuxTmuxCommand' , ' tmux' )
16
16
endfunction
17
17
18
18
if ! executable (s: VimuxTmuxCmd ())
@@ -60,7 +60,7 @@ function! VimuxRunCommand(command, ...)
60
60
let l: autoreturn = a: 1
61
61
endif
62
62
63
- let resetSequence = s: VimuxOption (' g:VimuxResetSequence' , ' q C-u' )
63
+ let resetSequence = VimuxOption (' g:VimuxResetSequence' , ' q C-u' )
64
64
let g: VimuxLastCommand = a: command
65
65
66
66
call VimuxSendKeys (resetSequence)
@@ -86,13 +86,13 @@ 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 VimuxOption (' g:VimuxUseNearest' , 1 ) == # 1 && nearestIndex != -1
90
90
let g: VimuxRunnerIndex = nearestIndex
91
91
else
92
- let extraArguments = s: VimuxOption (' g:VimuxOpenExtraArgs' , ' ' )
92
+ let extraArguments = VimuxOption (' g:VimuxOpenExtraArgs' , ' ' )
93
93
if s: VimuxRunnerType () == # ' pane'
94
- let height = s: VimuxOption (' g:VimuxHeight' , 20 )
95
- let orientation = s: VimuxOption (' g:VimuxOrientation' , ' v' )
94
+ let height = VimuxOption (' g:VimuxHeight' , 20 )
95
+ let orientation = VimuxOption (' g:VimuxOrientation' , ' v' )
96
96
call s: VimuxTmux (' split-window -p ' .height.' -' .orientation.' ' .extraArguments)
97
97
elseif s: VimuxRunnerType () == # ' window'
98
98
call s: VimuxTmux (' new-window ' .extraArguments)
@@ -114,7 +114,7 @@ endfunction
114
114
function ! VimuxTogglePane ()
115
115
if exists (' g:VimuxRunnerIndex' )
116
116
if s: VimuxRunnerType () == # ' window'
117
- call s: VimuxTmux (' join-pane -d -s ' .g: VimuxRunnerIndex .' -p ' .s: VimuxOption (' g:VimuxHeight' , 20 ))
117
+ call s: VimuxTmux (' join-pane -d -s ' .g: VimuxRunnerIndex .' -p ' .VimuxOption (' g:VimuxHeight' , 20 ))
118
118
let g: VimuxRunnerType = ' pane'
119
119
elseif s: VimuxRunnerType () == # ' pane'
120
120
let g: VimuxRunnerIndex= substitute (s: VimuxTmux (' break-pane -d -t ' .g: VimuxRunnerIndex ." -P -F '#{window_id}'" ), ' \n' , ' ' , ' ' )
@@ -168,12 +168,12 @@ endfunction
168
168
169
169
function ! VimuxPromptCommand (... )
170
170
let command = a: 0 == # 1 ? a: 1 : ' '
171
- let l: command = input (s: VimuxOption (' g:VimuxPromptString' , ' Command? ' ), command , ' shellcmd' )
171
+ let l: command = input (VimuxOption (' g:VimuxPromptString' , ' Command? ' ), command , ' shellcmd' )
172
172
call VimuxRunCommand (l: command )
173
173
endfunction
174
174
175
175
function ! s: VimuxTmux (arguments)
176
- if s: VimuxOption (' g:VimuxDebug' , 0 ) != 0
176
+ if VimuxOption (' g:VimuxDebug' , 0 ) != 0
177
177
echom s: VimuxTmuxCmd ().' ' .a: arguments
178
178
endif
179
179
return system (s: VimuxTmuxCmd ().' ' .a: arguments )
@@ -214,7 +214,7 @@ function! s:VimuxNearestIndex()
214
214
endfunction
215
215
216
216
function ! s: VimuxGetTargetFilter ()
217
- let targetName = s: VimuxOption (' g:VimuxRunnerName' , ' ' )
217
+ let targetName = VimuxOption (' g:VimuxRunnerName' , ' ' )
218
218
if targetName == # ' '
219
219
return ' '
220
220
endif
@@ -227,7 +227,7 @@ function! s:VimuxGetTargetFilter()
227
227
endfunction
228
228
229
229
function ! s: VimuxSetRunnerName ()
230
- let targetName = s: VimuxOption (' g:VimuxRunnerName' , ' ' )
230
+ let targetName = VimuxOption (' g:VimuxRunnerName' , ' ' )
231
231
if targetName == # ' '
232
232
return
233
233
endif
@@ -241,7 +241,7 @@ endfunction
241
241
242
242
243
243
function ! s: VimuxRunnerType ()
244
- return s: VimuxOption (' g:VimuxRunnerType' , ' pane' )
244
+ return VimuxOption (' g:VimuxRunnerType' , ' pane' )
245
245
endfunction
246
246
247
247
function ! s: VimuxTmuxProperty (property)
0 commit comments