File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,17 @@ The keys sent to the runner pane before running a command. By default it sends
291
291
292
292
Default: "q C-u"
293
293
294
+ ------------------------------------------------------------------------------
295
+ *VimuxPromptString*
296
+ 2.5 g:VimuxPromptString~
297
+
298
+ The string presented in the vim command line when Vimux is invoked. Be sure
299
+ to put a space at the end of the string to allow for distinction between
300
+ the prompt and your input.
301
+
302
+ let g:VimuxPromptString = ""
303
+
304
+ Default: "Command? "
294
305
295
306
==============================================================================
296
307
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:
Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ endfunction
154
154
155
155
156
156
function VimuxPromptCommand ()
157
- let l: command = input (" Command? " )
157
+ if exists (" g:VimuxPromptString" )
158
+ let l: command = input (g: VimuxPromptString )
159
+ elseif
160
+ let l: command = input (" Command? " )
161
+ endif
158
162
call VimuxRunCommand (l: command )
159
163
endfunction
160
164
@@ -315,14 +319,10 @@ class TmuxSession
315
319
end
316
320
317
321
def _send_command (command , target, auto_return = true)
318
- _run (" send-keys -t #{target} \" #{_escape_command( command)}\" " )
322
+ _run (" send-keys -t #{target} \" #{command.gsub(' " ' , ' \" ' )}\" " )
319
323
_run (" send-keys -t #{target} Enter" ) if auto_return
320
324
end
321
325
322
- def _escape_command (command )
323
- command .gsub (' "' , ' \"' ).gsub (' $' , ' \$' )
324
- end
325
-
326
326
def _run (command )
327
327
`tmux #{command }`
328
328
end
You can’t perform that action at this time.
0 commit comments