@@ -13,16 +13,16 @@ command VimuxPromptCommand :call VimuxPromptCommand()
13
13
command VimuxClearRunnerHistory :call VimuxClearRunnerHistory ()
14
14
15
15
function ! VimuxRunLastCommand ()
16
- if exists (" g:VimuxRunnerPaneIndex " )
16
+ if exists (" g:VimuxRunnerIndex " )
17
17
call VimuxRunCommand (g: VimuxLastCommand )
18
18
else
19
19
echo " No last vimux command."
20
20
endif
21
21
endfunction
22
22
23
23
function ! VimuxRunCommand (command , ... )
24
- if ! exists (" g:VimuxRunnerPaneIndex " ) || _VimuxHasPane (g: VimuxRunnerPaneIndex ) == -1
25
- call VimuxOpenPane ()
24
+ if ! exists (" g:VimuxRunnerIndex " ) || _VimuxHasRunner (g: VimuxRunnerIndex ) == -1
25
+ call VimuxOpenRunner ()
26
26
endif
27
27
28
28
let l: autoreturn = 1
@@ -46,36 +46,36 @@ function! VimuxSendText(text)
46
46
endfunction
47
47
48
48
function ! VimuxSendKeys (keys )
49
- if exists (" g:VimuxRunnerPaneIndex " )
50
- call system (" tmux send-keys -t " .g: VimuxRunnerPaneIndex ." " .a: keys )
49
+ if exists (" g:VimuxRunnerIndex " )
50
+ call system (" tmux send-keys -t " .g: VimuxRunnerIndex ." " .a: keys )
51
51
else
52
- echo " No vimux runner pane. Create one with VimuxOpenPane "
52
+ echo " No vimux runner pane/window . Create one with VimuxOpenRunner "
53
53
endif
54
54
endfunction
55
55
56
- function ! VimuxOpenPane ()
56
+ function ! VimuxOpenRunner ()
57
57
let height = _VimuxOption (" g:VimuxHeight" , 20 )
58
58
let orientation = _VimuxOption (" g:VimuxOrientation" , " v" )
59
- let nearestIndex = _VimuxNearestPaneIndex ()
59
+ let nearestIndex = _VimuxNearestIndex ()
60
60
61
- if _VimuxOption (" g:VimuxUseNearestPane " , 1 ) == 1 && nearestIndex != -1
62
- let g: VimuxRunnerPaneIndex = nearestIndex
61
+ if _VimuxOption (" g:VimuxUseNearest " , 1 ) == 1 && nearestIndex != -1
62
+ let g: VimuxRunnerIndex = nearestIndex
63
63
else
64
64
call system (" tmux split-window -p " .height." -" .orientation)
65
- let g: VimuxRunnerPaneIndex = _VimuxTmuxPaneIndex ()
65
+ let g: VimuxRunnerIndex = _VimuxTmuxIndex ()
66
66
call system (" tmux last-pane" )
67
67
endif
68
68
endfunction
69
69
70
70
function ! VimuxCloseRunner ()
71
- if exists (" g:VimuxRunnerPaneIndex " )
72
- call system (" tmux kill-pane -t " .g: VimuxRunnerPaneIndex )
73
- unlet g: VimuxRunnerPaneIndex
71
+ if exists (" g:VimuxRunnerIndex " )
72
+ call system (" tmux kill-pane -t " .g: VimuxRunnerIndex )
73
+ unlet g: VimuxRunnerIndex
74
74
endif
75
75
endfunction
76
76
77
77
function ! VimuxInspectRunner ()
78
- call system (" tmux select-pane -t " .g: VimuxRunnerPaneIndex )
78
+ call system (" tmux select-pane -t " .g: VimuxRunnerIndex )
79
79
call system (" tmux copy-mode" )
80
80
endfunction
81
81
@@ -96,8 +96,8 @@ function! VimuxInterruptRunner()
96
96
endfunction
97
97
98
98
function ! VimuxClearRunnerHistory ()
99
- if exists (" g:VimuxRunnerPaneIndex " )
100
- call system (" tmux clear-history -t " .g: VimuxRunnerPaneIndex )
99
+ if exists (" g:VimuxRunnerIndex " )
100
+ call system (" tmux clear-history -t " .g: VimuxRunnerIndex )
101
101
endif
102
102
endfunction
103
103
@@ -110,15 +110,15 @@ function! _VimuxTmuxSession()
110
110
return _VimuxTmuxProperty (" S" )
111
111
endfunction
112
112
113
- function ! _VimuxTmuxPaneIndex ()
113
+ function ! _VimuxTmuxIndex ()
114
114
return _VimuxTmuxProperty (" P" )
115
115
endfunction
116
116
117
117
function ! _VimuxTmuxWindowIndex ()
118
118
return _VimuxTmuxProperty (" I" )
119
119
endfunction
120
120
121
- function ! _VimuxNearestPaneIndex ()
121
+ function ! _VimuxNearestIndex ()
122
122
let panes = split (system (" tmux list-panes" ), " \n " )
123
123
124
124
for pane in panes
@@ -142,6 +142,6 @@ function! _VimuxTmuxProperty(property)
142
142
return substitute (system (" tmux display -p '#" .a: property ." '" ), ' \n$' , ' ' , ' ' )
143
143
endfunction
144
144
145
- function ! _VimuxHasPane (index )
145
+ function ! _VimuxHasRunner (index )
146
146
return match (system (" tmux list-panes" ), a: index ." :" )
147
147
endfunction
0 commit comments