Skip to content

Commit 7c54b7a

Browse files
committed
Merge branch '1.0.0rc1'
Conflicts: plugin/vimux.vim
2 parents d99e30c + 064ca86 commit 7c54b7a

File tree

2 files changed

+121
-337
lines changed

2 files changed

+121
-337
lines changed

doc/vimux.txt

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ process finishes and will see the output in the pane when it's finished.
6161

6262
Furthermore there are several handy commands all starting with 'Vimux':
6363
- |VimuxRunCommand|
64-
- |VimuxRunLastCommand|
64+
- |VimuxSendText|
65+
- |VimuxSendKeys|
66+
- |VimuxOpenPane|
67+
- |VimuxRunLastCommand|
6568
- |VimuxCloseRunner|
6669
- |VimuxClosePanes|
6770
- |VimuxCloseWindows|
@@ -70,22 +73,7 @@ Furthermore there are several handy commands all starting with 'Vimux':
7073
- |VimuxPromptCommand|
7174
- |VimuxClearRunnerHistory|
7275

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-
8776
------------------------------------------------------------------------------
88-
*RunVimTmuxCommand*
8977
*VimuxRunCommand*
9078
VimuxRunCommand~
9179

@@ -100,7 +88,32 @@ vimux from automatically sending a return after the command.
10088
<
10189

10290
------------------------------------------------------------------------------
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+
------------------------------------------------------------------------------
104117
*VimuxPromptCommand*
105118
VimuxPromptCommand~
106119

@@ -112,7 +125,6 @@ pane.
112125
<
113126

114127
------------------------------------------------------------------------------
115-
*RunLastVimTmuxCommand*
116128
*VimuxRunLastCommand*
117129
VimuxRunLastCommand~
118130

@@ -123,7 +135,6 @@ Run the last command executed by `VimuxRunCommand`
123135
<
124136

125137
------------------------------------------------------------------------------
126-
*InspectVimTmuxRunner*
127138
*VimuxInspectRunner*
128139
VimuxInspectRunner~
129140

@@ -135,7 +146,6 @@ pmode (scroll mode).
135146
<
136147

137148
------------------------------------------------------------------------------
138-
*CloseVimTmuxRunner*
139149
*VimuxCloseRunner*
140150
VimuxCloseRunner~
141151

@@ -146,18 +156,6 @@ Close the tmux runner created by `VimuxRunCommand`
146156
<
147157

148158
------------------------------------------------------------------------------
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*
161159
*VimuxInterruptRunner*
162160
VimuxInterruptRunner~
163161

@@ -194,22 +192,19 @@ Full Keybind Example~
194192
map <Leader>rb :call VimuxRunCommand("clear; rspec " . bufname("%"))<CR>
195193
196194
" Prompt for a command to run
197-
map <Leader>rp :VimuxPromptCommand<CR>
195+
map <Leader>vp :VimuxPromptCommand<CR>
198196
199197
" Run last command executed by VimuxRunCommand
200-
map <Leader>rl :VimuxRunLastCommand<CR>
198+
map <Leader>vl :VimuxRunLastCommand<CR>
201199
202200
" 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>
207202
208203
" Close vim tmux runner opened by VimuxRunCommand
209-
map <Leader>rq :VimuxCloseRunner<CR>
204+
map <Leader>vq :VimuxCloseRunner<CR>
210205
211206
" Interrupt any command running in the runner pane
212-
map <Leader>rs :VimuxInterruptRunner<CR>
207+
map <Leader>vx :VimuxInterruptRunner<CR>
213208
>
214209
215210
------------------------------------------------------------------------------
@@ -220,11 +215,13 @@ Here is how to use vimux to send code to a REPL. This is similar to tslime.
220215
First, add some helpful mappings.
221216

222217
>
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
225222
226223
" 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>
228225
229226
" Select current paragraph and send it to tmux
230227
nmap <LocalLeader>vs vip<LocalLeader>vs<CR>

0 commit comments

Comments
 (0)