From d78cd0f8e17b277f35e4df3fdb683761f5801937 Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Tue, 19 Aug 2014 08:55:31 +0200 Subject: [PATCH] Predefined command option for VimuxPromptCommand Added the possibility to specify a predefined command which can be edited or completed in the prompt line. --- plugin/vimux.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 4a4acce..3aaba22 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -11,7 +11,7 @@ command VimuxInspectRunner :call VimuxInspectRunner() command VimuxScrollUpInspect :call VimuxScrollUpInspect() command VimuxScrollDownInspect :call VimuxScrollDownInspect() command VimuxInterruptRunner :call VimuxInterruptRunner() -command VimuxPromptCommand :call VimuxPromptCommand() +command -nargs=? VimuxPromptCommand :call VimuxPromptCommand() command VimuxClearRunnerHistory :call VimuxClearRunnerHistory() command VimuxTogglePane :call VimuxTogglePane() @@ -37,6 +37,7 @@ function! VimuxRunCommand(command, ...) let g:VimuxLastCommand = a:command call VimuxSendKeys(resetSequence) + echo a:command call VimuxSendText(a:command) if l:autoreturn == 1 @@ -131,8 +132,8 @@ function! VimuxClearRunnerHistory() endif endfunction -function! VimuxPromptCommand() - let l:command = input(_VimuxOption("g:VimuxPromptString", "Command? ")) +function! VimuxPromptCommand(command, ...) + let l:command = input(_VimuxOption("g:VimuxPromptString", "Command? "),a:command) call VimuxRunCommand(l:command) endfunction