@@ -61,7 +61,10 @@ process finishes and will see the output in the pane when it's finished.
61
61
62
62
Furthermore there are several handy commands all starting with 'Vimux':
63
63
- | VimuxRunCommand |
64
- - | VimuxRunLastCommand |
64
+ - | VimuxSendText |
65
+ - | VimuxSendKeys |
66
+ - | VimuxOpenPane |
67
+ - | VimuxRunLastCommand |
65
68
- | VimuxCloseRunner |
66
69
- | VimuxClosePanes |
67
70
- | VimuxCloseWindows |
@@ -70,22 +73,7 @@ Furthermore there are several handy commands all starting with 'Vimux':
70
73
- | VimuxPromptCommand |
71
74
- | VimuxClearRunnerHistory |
72
75
73
-
74
- Note:
75
- Earlier the all commands had different names. There are still aliases for
76
- convenience. Please chang your configuration according to the new naming
77
- conventions!
78
-
79
- The DEPRECATED commands:
80
- - | PromptVimTmuxCommand |
81
- - | RunLastVimTmuxCommand |
82
- - | InspectVimTmuxRunner |
83
- - | CloseVimTmuxRunner |
84
- - | CloseVimTmuxPanes |
85
- - | InterruptVimTmuxRunner |
86
-
87
76
------------------------------------------------------------------------------
88
- *RunVimTmuxCommand*
89
77
*VimuxRunCommand*
90
78
VimuxRunCommand~
91
79
@@ -100,7 +88,32 @@ vimux from automatically sending a return after the command.
100
88
<
101
89
102
90
------------------------------------------------------------------------------
103
- *PromptVimTmuxCommand*
91
+ *VimuxSendText*
92
+ VimuxSendText~
93
+
94
+ Send raw text to the runer pane. This command will not open a new pane if one
95
+ does not already exist. You will need to use VimuxOpenPane to do this. This
96
+ command can be used to interact with REPLs or other interactive terminal
97
+ programs that are not shells.
98
+
99
+
100
+ ------------------------------------------------------------------------------
101
+ *VimuxSendKeys*
102
+ VimuxSendKeys~
103
+
104
+ Send keys to the runner pane. This command will not open a new pane if one
105
+ does not already exist. You will need to use VimuxOpenPane to do this. You can
106
+ use this command to send keys such as "Enter" or "C-c" to the runner pane.
107
+
108
+ ------------------------------------------------------------------------------
109
+ *VimuxOpenPane*
110
+ VimuxOpenPane~
111
+
112
+ This will either opne a new pane or use the nearest pane and set it as the
113
+ vimux runner pane for the other vimux commands. You can control if this command
114
+ uses the nearest pane or always creates a new one with g:VimuxUseNearestPane
115
+
116
+ ------------------------------------------------------------------------------
104
117
*VimuxPromptCommand*
105
118
VimuxPromptCommand~
106
119
@@ -112,7 +125,6 @@ pane.
112
125
<
113
126
114
127
------------------------------------------------------------------------------
115
- *RunLastVimTmuxCommand*
116
128
*VimuxRunLastCommand*
117
129
VimuxRunLastCommand~
118
130
@@ -123,7 +135,6 @@ Run the last command executed by `VimuxRunCommand`
123
135
<
124
136
125
137
------------------------------------------------------------------------------
126
- *InspectVimTmuxRunner*
127
138
*VimuxInspectRunner*
128
139
VimuxInspectRunner~
129
140
@@ -135,7 +146,6 @@ pmode (scroll mode).
135
146
<
136
147
137
148
------------------------------------------------------------------------------
138
- *CloseVimTmuxRunner*
139
149
*VimuxCloseRunner*
140
150
VimuxCloseRunner~
141
151
@@ -146,18 +156,6 @@ Close the tmux runner created by `VimuxRunCommand`
146
156
<
147
157
148
158
------------------------------------------------------------------------------
149
- *CloseVimTmuxPanes*
150
- *VimuxClosePanes*
151
- VimuxClosePanes~
152
-
153
- Close all other tmux panes in the current window.
154
- >
155
- " Close all other tmux panes in current window
156
- map <Leader>vx :VimuxClosePanes<CR>
157
- >
158
-
159
- ------------------------------------------------------------------------------
160
- *InterruptVimTmuxRunner*
161
159
*VimuxInterruptRunner*
162
160
VimuxInterruptRunner~
163
161
@@ -194,22 +192,19 @@ Full Keybind Example~
194
192
map <Leader>rb :call VimuxRunCommand("clear; rspec " . bufname("%"))<CR>
195
193
196
194
" Prompt for a command to run
197
- map <Leader>rp :VimuxPromptCommand<CR>
195
+ map <Leader>vp :VimuxPromptCommand<CR>
198
196
199
197
" Run last command executed by VimuxRunCommand
200
- map <Leader>rl :VimuxRunLastCommand<CR>
198
+ map <Leader>vl :VimuxRunLastCommand<CR>
201
199
202
200
" Inspect runner pane
203
- map <Leader>ri :VimuxInspectRunner<CR>
204
-
205
- " Close all other tmux panes in current window
206
- map <Leader>rx :VimuxClosePanes<CR>
201
+ map <Leader>vi :VimuxInspectRunner<CR>
207
202
208
203
" Close vim tmux runner opened by VimuxRunCommand
209
- map <Leader>rq :VimuxCloseRunner<CR>
204
+ map <Leader>vq :VimuxCloseRunner<CR>
210
205
211
206
" Interrupt any command running in the runner pane
212
- map <Leader>rs :VimuxInterruptRunner<CR>
207
+ map <Leader>vx :VimuxInterruptRunner<CR>
213
208
>
214
209
215
210
------------------------------------------------------------------------------
@@ -220,11 +215,13 @@ Here is how to use vimux to send code to a REPL. This is similar to tslime.
220
215
First, add some helpful mappings.
221
216
222
217
>
223
- " Prompt for a command to run
224
- map <LocalLeader>vp :VimuxPromptCommand<CR>
218
+ function! VimuxSlime()
219
+ call VimuxSendText(@v)
220
+ call VimuxSendKeys("Enter")
221
+ endfunction
225
222
226
223
" If text is selected, save it in the v buffer and send that buffer it to tmux
227
- vmap <LocalLeader>vs "vy :call VimuxRunCommand(@v . "\n", 0 )<CR>
224
+ vmap <LocalLeader>vs "vy :call VimuxSlime( )<CR>
228
225
229
226
" Select current paragraph and send it to tmux
230
227
nmap <LocalLeader>vs vip<LocalLeader>vs<CR>
0 commit comments