Add CtrlD send sequence

This commit is contained in:
Chris Toomey 2013-03-22 14:48:03 -04:00
parent b612b63ec9
commit 0470d5cb3f
2 changed files with 14 additions and 0 deletions

View File

@ -20,6 +20,7 @@ CONTENTS *vtr-contents*
2.10 ............................... |VtrReattachRunner|
2.11 ............................... |VtrClearRunner|
2.12 ............................... |VtrFlushCommand|
2.13 ............................... |VtrSendCtrlD|
3. Configuration ................... |VTR-Configuration|
3.1 ................................ |VtrPercentage|
3.2 ................................ |VtrOrientation|
@ -205,6 +206,14 @@ move the prompt up to hide any previous command output.
Flush the previous run command variable. After running this command, the next
run of |VtrSendCommandToRunner| will again prompt for the command to run.
------------------------------------------------------------------------------
*VtrSendCtrlD*
2.12 VtrSendCtrlD~
Send Ctrl-D key sequence to the runner without resetting the current command.
This is useful if you are repeatedly running a script in the debugger and
regularly need to kill the repl.
==============================================================================
CONFIGURATION (3) *VTR-Configuration*

View File

@ -330,6 +330,10 @@ function! s:SendTextToRunner(text)
call s:SendEnterSequence()
endfunction
function! s:SendCtrlD()
call s:SendKeys('')
endfunction
function! VtrSendCommand(command)
call s:EnsureRunnerPane()
let escaped_command = shellescape(a:command)
@ -349,6 +353,7 @@ function! s:DefineCommands()
command! VtrReattachRunner call s:ReattachPane()
command! VtrClearRunner call s:SendClearSequence()
command! VtrFlushCommand call s:FlushCommand()
command! VtrSendCtrlD call s:SendCtrlD()
endfunction
function! s:DefineKeymaps()