From 173fcda85d2b69d015f59d4c4348e1694ac34824 Mon Sep 17 00:00:00 2001 From: benmills Date: Wed, 3 Apr 2013 13:03:57 -0500 Subject: [PATCH] Update help docs for 1.0.0. --- doc/vimux.txt | 83 +++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/doc/vimux.txt b/doc/vimux.txt index 37de16a..dc0483c 100644 --- a/doc/vimux.txt +++ b/doc/vimux.txt @@ -61,7 +61,10 @@ process finishes and will see the output in the pane when it's finished. Furthermore there are several handy commands all starting with 'Vimux': - |VimuxRunCommand| - - |VimuxRunLastCommand| + - |VimuxSendText| + - |VimuxSendKeys| + - |VimuxOpenPane| + - |VimuxRunLastCommand| - |VimuxCloseRunner| - |VimuxClosePanes| - |VimuxCloseWindows| @@ -70,22 +73,7 @@ Furthermore there are several handy commands all starting with 'Vimux': - |VimuxPromptCommand| - |VimuxClearRunnerHistory| - -Note: -Earlier the all commands had different names. There are still aliases for -convenience. Please chang your configuration according to the new naming -conventions! - -The DEPRECATED commands: - - |PromptVimTmuxCommand| - - |RunLastVimTmuxCommand| - - |InspectVimTmuxRunner| - - |CloseVimTmuxRunner| - - |CloseVimTmuxPanes| - - |InterruptVimTmuxRunner| - ------------------------------------------------------------------------------ - *RunVimTmuxCommand* *VimuxRunCommand* VimuxRunCommand~ @@ -100,7 +88,32 @@ vimux from automatically sending a return after the command. < ------------------------------------------------------------------------------ - *PromptVimTmuxCommand* + *VimuxSendText* +VimuxSendText~ + +Send raw text to the runer pane. This command will *not* open a new pane if one +does not already exist. You will need to use VimuxOpenPane to do this. This +command can be used to interact with REPLs or other interactive terminal +programs that are not shells. + + +------------------------------------------------------------------------------ + *VimuxSendKeys* +VimuxSendKeys~ + +Send keys to the runner pane. This command will *not* open a new pane if one +does not already exist. You will need to use VimuxOpenPane to do this. You can +use this command to send keys such as "Enter" or "C-c" to the runner pane. + +------------------------------------------------------------------------------ + *VimuxOpenPane* +VimuxOpenPane~ + +This will either opne a new pane or use the nearest pane and set it as the +vimux runner pane for the other vimux commands. You can control if this command +uses the nearest pane or always creates a new one with g:VimuxUseNearestPane + +------------------------------------------------------------------------------ *VimuxPromptCommand* VimuxPromptCommand~ @@ -112,7 +125,6 @@ pane. < ------------------------------------------------------------------------------ - *RunLastVimTmuxCommand* *VimuxRunLastCommand* VimuxRunLastCommand~ @@ -123,7 +135,6 @@ Run the last command executed by `VimuxRunCommand` < ------------------------------------------------------------------------------ - *InspectVimTmuxRunner* *VimuxInspectRunner* VimuxInspectRunner~ @@ -135,7 +146,6 @@ pmode (scroll mode). < ------------------------------------------------------------------------------ - *CloseVimTmuxRunner* *VimuxCloseRunner* VimuxCloseRunner~ @@ -146,18 +156,6 @@ Close the tmux runner created by `VimuxRunCommand` < ------------------------------------------------------------------------------ - *CloseVimTmuxPanes* - *VimuxClosePanes* -VimuxClosePanes~ - -Close all other tmux panes in the current window. -> - " Close all other tmux panes in current window - map vx :VimuxClosePanes -> - ------------------------------------------------------------------------------- - *InterruptVimTmuxRunner* *VimuxInterruptRunner* VimuxInterruptRunner~ @@ -194,22 +192,19 @@ Full Keybind Example~ map rb :call VimuxRunCommand("clear; rspec " . bufname("%")) " Prompt for a command to run - map rp :VimuxPromptCommand + map vp :VimuxPromptCommand " Run last command executed by VimuxRunCommand - map rl :VimuxRunLastCommand + map vl :VimuxRunLastCommand " Inspect runner pane - map ri :VimuxInspectRunner - - " Close all other tmux panes in current window - map rx :VimuxClosePanes + map vi :VimuxInspectRunner " Close vim tmux runner opened by VimuxRunCommand - map rq :VimuxCloseRunner + map vq :VimuxCloseRunner " Interrupt any command running in the runner pane - map rs :VimuxInterruptRunner + map vx :VimuxInterruptRunner > ------------------------------------------------------------------------------ @@ -220,11 +215,13 @@ Here is how to use vimux to send code to a REPL. This is similar to tslime. First, add some helpful mappings. > - " Prompt for a command to run - map vp :VimuxPromptCommand + function! VimuxSlime() + call VimuxSendText(@v) + call VimuxSendKeys("Enter") + endfunction " If text is selected, save it in the v buffer and send that buffer it to tmux - vmap vs "vy :call VimuxRunCommand(@v . "\n", 0) + vmap vs "vy :call VimuxSlime() " Select current paragraph and send it to tmux nmap vs vipvs