@@ -8,12 +8,12 @@ CONTENTS *vimux-contents*
8
8
9
9
1. About............................ | VimuxAbout |
10
10
2. Usage ........................... | VimuxUsage |
11
- 2.1 .............................. | PromptVimTmuxCommand |
12
- 2.2 .............................. | RunLastVimTmuxCommand |
13
- 2.3 .............................. | InspectVimTmuxRunner |
14
- 2.4 .............................. | CloseVimTmuxRunner |
15
- 2.5 .............................. | CloseVimTmuxPanes |
16
- 2.6 .............................. | InterruptVimTmuxRunner |
11
+ 2.1 .............................. | VimuxPromptCommand |
12
+ 2.2 .............................. | VimuxRunLastCommand |
13
+ 2.3 .............................. | VimuxInspectRunner |
14
+ 2.4 .............................. | VimuxCloseRunner |
15
+ 2.5 .............................. | VimuxClosePanes |
16
+ 2.6 .............................. | VimuxInterruptRunner |
17
17
3. Misc ............................ | VimuxMisc |
18
18
3.1 Example Keybinding............ | VimuxExampleKeybinding |
19
19
3.2 Tslime Replacement............ | VimuxTslimeReplacement |
@@ -31,14 +31,14 @@ for my primary use case which was having a smaller tmux pane that I would use
31
31
to run tests or play with a REPL.
32
32
33
33
My goal with vimux is to make interacting with tmux from vim effortless. By
34
- default when you call `RunVimTmuxCommand ` vimux will create a 20% tall
34
+ default when you call `VimuxRunCommand ` vimux will create a 20% tall
35
35
horizontal pane under your current tmux pane and execute a command in it
36
36
without losing focus of vim. Once that pane exists whenever you call
37
- `RunVimTmuxCommand ` again the command will be executed in that pane. As I was
37
+ `VimuxRunCommand ` again the command will be executed in that pane. As I was
38
38
using vimux myself I wanted to rerun commands over and over. An example of
39
39
this was running the current file through rspec. Rather than typing that over
40
- and over I wrote `RunLastVimTmuxCommand ` that will execute the last command
41
- you called with `RunVimTmuxCommand ` .
40
+ and over I wrote `VimuxRunLastCommand ` that will execute the last command
41
+ you called with `VimuxRunCommand ` .
42
42
43
43
Other auxiliary functions and the ones I talked about above can be found
44
44
bellow with a full description and example key binds for your vimrc.
@@ -49,17 +49,32 @@ bellow with a full description and example key binds for your vimrc.
49
49
==============================================================================
50
50
USAGE (2) *VimuxUsage*
51
51
52
- The function RunVimTmuxCommand (command) is the core of Vimux. It will
52
+ The function VimuxRunCommand (command) is the core of Vimux. It will
53
53
create a split pane in the current window and run the passed command in it.
54
-
55
- :call RunVimTmuxCommand ("ls")
56
-
54
+ >
55
+ :call VimuxRunCommand ("ls")
56
+ <
57
57
This will run the command in a split pane without losing focus of vim. If the
58
58
command takes a long time to return you can continue to use vim while the
59
59
process finishes and will see the output in the pane when it's finished.
60
60
61
- Furthermore there are several handy commands:
61
+ Furthermore there are several handy commands all starting with 'Vimux':
62
+ - | VimuxRunCommand |
63
+ - | VimuxRunLastCommand |
64
+ - | VimuxCloseRunner |
65
+ - | VimuxClosePanes |
66
+ - | VimuxCloseWindows |
67
+ - | VimuxInspectRunner |
68
+ - | VimuxInterruptRunner |
69
+ - | VimuxPromptCommand |
70
+
71
+
72
+ Note:
73
+ Earlier the all commands had different names. There are still aliases for
74
+ convenience. Please chang your configuration according to the new naming
75
+ conventions!
62
76
77
+ The DEPRECATED commands:
63
78
- | PromptVimTmuxCommand |
64
79
- | RunLastVimTmuxCommand |
65
80
- | InspectVimTmuxRunner |
@@ -69,79 +84,86 @@ Furthermore there are several handy commands:
69
84
70
85
------------------------------------------------------------------------------
71
86
*RunVimTmuxCommand*
72
- RunVimTmuxCommand~
87
+ *VimuxRunCommand*
88
+ VimuxRunCommand~
73
89
74
90
Run a system command in a small horizontal split bellow
75
91
the current pane vim is in. You can optionally pass a second argument to stop
76
92
vimux from automatically sending a return after the command.
77
93
>
78
94
" Run the current file with rspec
79
- map <Leader>rb :call RunVimTmuxCommand ("clear; rspec " . bufname("%"))<CR>
95
+ map <Leader>rb :call VimuxRunCommand ("clear; rspec " . bufname("%"))<CR>
80
96
" Run command without sending sending a return
81
- map <Leader>rq :call RunVimTmuxCommand ("clear; rspec " . bufname("%"), 0)<CR>
97
+ map <Leader>rq :call VimuxRunCommand ("clear; rspec " . bufname("%"), 0)<CR>
82
98
<
83
99
84
100
------------------------------------------------------------------------------
85
101
*PromptVimTmuxCommand*
86
- PromptVimTmuxCommand~
102
+ *VimuxPromptCommand*
103
+ VimuxPromptCommand~
87
104
88
105
Prompt for a command and run it in a small horizontal split bellow the current
89
106
pane.
90
107
>
91
108
" Prompt for a command to run map
92
- <Leader>rp :PromptVimTmuxCommand <CR>
109
+ <Leader>rp :VimuxPromptCommand <CR>
93
110
<
94
111
95
112
------------------------------------------------------------------------------
96
113
*RunLastVimTmuxCommand*
97
- RunLastVimTmuxCommand~
114
+ *VimuxRunLastCommand*
115
+ VimuxRunLastCommand~
98
116
99
- Run the last command executed by `RunVimTmuxCommand `
117
+ Run the last command executed by `VimuxRunCommand `
100
118
>
101
- " Run last command executed by RunVimTmuxCommand
102
- map <Leader>rl :RunLastVimTmuxCommand <CR>
119
+ " Run last command executed by VimuxRunCommand
120
+ map <Leader>rl :VimuxRunLastCommand <CR>
103
121
<
104
122
105
123
------------------------------------------------------------------------------
106
124
*InspectVimTmuxRunner*
107
- InspectVimTmuxRunner~
125
+ *VimuxInspectRunner*
126
+ VimuxInspectRunner~
108
127
109
- Move into the tmux runner pane created by `RunVimTmuxCommand ` and enter copy
128
+ Move into the tmux runner pane created by `VimuxRunCommand ` and enter copy
110
129
pmode (scroll mode).
111
130
>
112
131
" Inspect runner pane map
113
- <Leader>ri :InspectVimTmuxRunner <CR>
132
+ <Leader>ri :VimuxInspectRunner <CR>
114
133
<
115
134
116
135
------------------------------------------------------------------------------
117
136
*CloseVimTmuxRunner*
118
- CloseVimTmuxRunner~
137
+ *VimuxCloseRunner*
138
+ VimuxCloseRunner~
119
139
120
- Close the tmux runner created by `RunVimTmuxCommand `
140
+ Close the tmux runner created by `VimuxRunCommand `
121
141
>
122
- " Close vim tmux runner opened by RunVimTmuxCommand
123
- map <Leader>rq :CloseVimTmuxRunner <CR>
142
+ " Close vim tmux runner opened by VimuxRunCommand
143
+ map <Leader>rq :VimuxCloseRunner <CR>
124
144
<
125
145
126
146
------------------------------------------------------------------------------
127
147
*CloseVimTmuxPanes*
128
- CloseVimTmuxPanes~
148
+ *VimuxClosePanes*
149
+ VimuxClosePanes~
129
150
130
151
Close all other tmux panes in the current window.
131
152
>
132
153
" Close all other tmux panes in current window
133
- map <Leader>rx :CloseVimTmuxPanes <CR>
154
+ map <Leader>rx :VimuxClosePanes <CR>
134
155
>
135
156
136
157
------------------------------------------------------------------------------
137
158
*InterruptVimTmuxRunner*
138
- InterruptVimTmuxRunner~
159
+ *VimuxInterruptRunner*
160
+ VimuxInterruptRunner~
139
161
140
162
Interrupt any command that is running inside the
141
163
runner pane.
142
164
>
143
165
" Interrupt any command running in the runner pane map
144
- <Leader>rs :InterruptVimTmuxRunner <CR>
166
+ <Leader>rs :VimuxInterruptRunner <CR>
145
167
<
146
168
147
169
@@ -154,25 +176,25 @@ Full Keybind Example~
154
176
155
177
>
156
178
" Run the current file with rspec
157
- map <Leader>rb :call RunVimTmuxCommand ("clear; rspec " . bufname("%"))<CR>
179
+ map <Leader>rb :call VimuxRunCommand ("clear; rspec " . bufname("%"))<CR>
158
180
159
181
" Prompt for a command to run
160
- map <Leader>rp :PromptVimTmuxCommand <CR>
182
+ map <Leader>rp :VimuxPromptCommand <CR>
161
183
162
- " Run last command executed by RunVimTmuxCommand
163
- map <Leader>rl :RunLastVimTmuxCommand <CR>
184
+ " Run last command executed by VimuxRunCommand
185
+ map <Leader>rl :VimuxRunLastCommand <CR>
164
186
165
187
" Inspect runner pane
166
- map <Leader>ri :InspectVimTmuxRunner <CR>
188
+ map <Leader>ri :VimuxInspectRunner <CR>
167
189
168
190
" Close all other tmux panes in current window
169
- map <Leader>rx :CloseVimTmuxPanes <CR>
191
+ map <Leader>rx :VimuxClosePanes <CR>
170
192
171
- " Close vim tmux runner opened by RunVimTmuxCommand
172
- map <Leader>rq :CloseVimTmuxRunner <CR>
193
+ " Close vim tmux runner opened by VimuxRunCommand
194
+ map <Leader>rq :VimuxCloseRunner <CR>
173
195
174
196
" Interrupt any command running in the runner pane
175
- map <Leader>rs :InterruptVimTmuxRunner <CR>
197
+ map <Leader>rs :VimuxInterruptRunner <CR>
176
198
>
177
199
178
200
------------------------------------------------------------------------------
@@ -184,10 +206,10 @@ First, add some helpful mappings.
184
206
185
207
>
186
208
" Prompt for a command to run
187
- map <LocalLeader>vp :PromptVimTmuxCommand <CR>
209
+ map <LocalLeader>vp :VimuxPromptCommand <CR>
188
210
189
211
" If text is selected, save it in the v buffer and send that buffer it to tmux
190
- vmap <LocalLeader>vs "vy :call RunVimTmuxCommand (@v . "\n", 0)<CR>
212
+ vmap <LocalLeader>vs "vy :call VimuxRunCommand (@v . "\n", 0)<CR>
191
213
192
214
" Select current paragraph and send it to tmux
193
215
nmap <LocalLeader>vs vip<LocalLeader>vs<CR>
@@ -196,7 +218,7 @@ First, add some helpful mappings.
196
218
Now, open a clojure file. Let's say your leader is backslash (\). Type \vp,
197
219
and then type lein repl at the prompt. This opens a tmux split running a REPL.
198
220
Then, select text or put the cursor on a function and type \vs. This will send
199
- it to the REPL and evaluate it. The reason we pass `0 ` to `RunVimTmuxCommand `
221
+ it to the REPL and evaluate it. The reason we pass `0 ` to `VimuxRunCommand `
200
222
is to stop the normal return that is sent to the runner pane and use our own
201
223
new line so the clojure REPL will evaluate the selected text without adding an
202
224
extra return. Thanks to @trptcolin for discovering this issue.
0 commit comments