2012-04-11 15:05:08 +00:00
|
|
|
*vimux.txt* easily interact with tmux
|
|
|
|
|
|
|
|
Vimux
|
|
|
|
effortless vim and tmux interaction
|
|
|
|
|
|
|
|
==============================================================================
|
2012-05-31 16:45:27 +00:00
|
|
|
CONTENTS *vimux-contents*
|
|
|
|
|
|
|
|
1. About............................ |VimuxAbout|
|
|
|
|
2. Usage ........................... |VimuxUsage|
|
2012-06-08 15:13:57 +00:00
|
|
|
2.1 .............................. |VimuxPromptCommand|
|
|
|
|
2.2 .............................. |VimuxRunLastCommand|
|
|
|
|
2.3 .............................. |VimuxInspectRunner|
|
|
|
|
2.4 .............................. |VimuxCloseRunner|
|
2013-11-29 07:28:16 +00:00
|
|
|
2.5 .............................. |VimuxInterruptRunner|
|
2021-02-13 16:17:10 +00:00
|
|
|
2.6 .............................. |VimuxClearTerminalScreen|
|
|
|
|
2.7 .............................. |VimuxClearRunnerHistory|
|
|
|
|
2.8 .............................. |VimuxZoomRunner|
|
|
|
|
2.9 .............................. |VimuxRunCommandInDir|
|
2012-05-31 16:45:27 +00:00
|
|
|
3. Misc ............................ |VimuxMisc|
|
|
|
|
3.1 Example Keybinding............ |VimuxExampleKeybinding|
|
|
|
|
3.2 Tslime Replacement............ |VimuxTslimeReplacement|
|
|
|
|
4. Configuration ................... |VimuxConfiguration|
|
2012-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
==============================================================================
|
2012-05-31 16:45:27 +00:00
|
|
|
ABOUT (1) *VimuxAbout*
|
|
|
|
|
|
|
|
Vimux -- Easily interact with tmux from vim.
|
|
|
|
|
2021-02-18 04:48:50 +00:00
|
|
|
Vimux was originally inspired by tslime.vim [1], a plugin that lets you send
|
|
|
|
input to tmux. While tslime.vim works well, it wasn't optimized for the use
|
|
|
|
case of having a smaller tmux pane used to run tests or play with a REPL. The
|
|
|
|
goal of Vimux is to make interacting with tmux from vim effortless.
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2021-02-18 04:48:50 +00:00
|
|
|
By default, when you call `VimuxRunCommand` vimux will create a 20% tall
|
2012-05-31 16:45:27 +00:00
|
|
|
horizontal pane under your current tmux pane and execute a command in it
|
2021-02-18 04:48:50 +00:00
|
|
|
without losing the focus on vim. Once that pane exists, whenever you call
|
|
|
|
`VimuxRunCommand` again the command will be executed in that pane. A frequent
|
|
|
|
use case is wanting to rerun commands over and over. An example of this is
|
|
|
|
running the current file through rspec. Rather than typing that over and over
|
|
|
|
`VimuxRunLastCommand` will execute the last command called with
|
|
|
|
`VimuxRunCommand`.
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2021-02-18 04:48:50 +00:00
|
|
|
Other auxiliary functions and the ones talked about above can be found bellow
|
|
|
|
with full descriptions and example key bindings for your vimrc.
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2021-02-18 04:48:50 +00:00
|
|
|
[1] https://github.com/jgdavey/tslime.vim/network
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
USAGE (2) *VimuxUsage*
|
2012-04-11 15:05:08 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
The function VimuxRunCommand(command) is the core of Vimux. It will
|
2012-04-11 15:05:08 +00:00
|
|
|
create a split pane in the current window and run the passed command in it.
|
2012-06-08 15:16:01 +00:00
|
|
|
>
|
2012-06-08 15:13:57 +00:00
|
|
|
:call VimuxRunCommand("ls")
|
2012-06-08 15:16:01 +00:00
|
|
|
<
|
2012-04-11 15:05:08 +00:00
|
|
|
This will run the command in a split pane without losing focus of vim. If the
|
|
|
|
command takes a long time to return you can continue to use vim while the
|
2012-05-31 16:45:27 +00:00
|
|
|
process finishes and will see the output in the pane when it's finished.
|
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
Furthermore there are several handy commands all starting with 'Vimux':
|
|
|
|
- |VimuxRunCommand|
|
2013-04-03 18:03:57 +00:00
|
|
|
- |VimuxSendText|
|
|
|
|
- |VimuxSendKeys|
|
2017-09-26 06:22:42 +00:00
|
|
|
- |VimuxOpenRunner|
|
2013-04-03 18:03:57 +00:00
|
|
|
- |VimuxRunLastCommand|
|
2012-06-08 15:13:57 +00:00
|
|
|
- |VimuxCloseRunner|
|
|
|
|
- |VimuxInspectRunner|
|
|
|
|
- |VimuxInterruptRunner|
|
|
|
|
- |VimuxPromptCommand|
|
2021-02-13 16:17:10 +00:00
|
|
|
- |VimuxClearTerminalScreen|
|
2012-06-15 18:06:38 +00:00
|
|
|
- |VimuxClearRunnerHistory|
|
2013-08-31 18:14:39 +00:00
|
|
|
- |VimuxZoomRunner|
|
2014-09-21 00:33:49 +00:00
|
|
|
- |VimuxRunCommandInDir|
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxRunCommand*
|
|
|
|
VimuxRunCommand~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
Run a system command in a small horizontal split bellow
|
|
|
|
the current pane vim is in. You can optionally pass a second argument to stop
|
|
|
|
vimux from automatically sending a return after the command.
|
|
|
|
>
|
|
|
|
" Run the current file with rspec
|
2012-06-08 15:13:57 +00:00
|
|
|
map <Leader>rb :call VimuxRunCommand("clear; rspec " . bufname("%"))<CR>
|
2013-02-19 03:56:40 +00:00
|
|
|
" Run command without sending a return
|
2012-06-08 15:13:57 +00:00
|
|
|
map <Leader>rq :call VimuxRunCommand("clear; rspec " . bufname("%"), 0)<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2013-04-03 18:03:57 +00:00
|
|
|
*VimuxSendText*
|
|
|
|
VimuxSendText~
|
|
|
|
|
2015-01-31 17:26:27 +00:00
|
|
|
Send raw text to the runner pane. This command will not open a new pane if one
|
2021-03-08 00:17:53 +00:00
|
|
|
does not already exist. You will need to use |VimuxOpenRunner| to do this. This
|
2013-04-03 18:03:57 +00:00
|
|
|
command can be used to interact with REPLs or other interactive terminal
|
|
|
|
programs that are not shells.
|
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxSendKeys*
|
|
|
|
VimuxSendKeys~
|
|
|
|
|
2013-04-03 18:05:15 +00:00
|
|
|
Send keys to the runner pane. This command will not open a new pane if one
|
2021-03-08 00:17:53 +00:00
|
|
|
does not already exist. You will need to use |VimuxOpenRunner| to do this. You
|
2017-09-26 06:22:42 +00:00
|
|
|
can use this command to send keys such as "Enter" or "C-c" to the runner pane.
|
2013-04-03 18:03:57 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2017-09-26 06:22:42 +00:00
|
|
|
*VimuxOpenRunner*
|
|
|
|
VimuxOpenRunner~
|
2013-04-03 18:03:57 +00:00
|
|
|
|
2013-07-05 15:17:01 +00:00
|
|
|
This will either open a new pane or use the nearest pane and set it as the
|
2013-04-03 18:03:57 +00:00
|
|
|
vimux runner pane for the other vimux commands. You can control if this command
|
2021-03-08 00:17:53 +00:00
|
|
|
uses the nearest pane or always creates a new one with g:|VimuxUseNearest|
|
2013-04-03 18:03:57 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxPromptCommand*
|
|
|
|
VimuxPromptCommand~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
Prompt for a command and run it in a small horizontal split bellow the current
|
2014-08-20 05:47:21 +00:00
|
|
|
pane. A parameter can be supplied to predefine a command or a part of the
|
|
|
|
command which can be edited in the prompt.
|
2012-05-31 16:45:27 +00:00
|
|
|
>
|
|
|
|
" Prompt for a command to run map
|
2013-10-29 11:52:15 +00:00
|
|
|
map <Leader>vp :VimuxPromptCommand<CR>
|
2014-08-20 05:47:21 +00:00
|
|
|
map <Leader>vm :VimuxPromptCommand("make ")<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxRunLastCommand*
|
|
|
|
VimuxRunLastCommand~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
Run the last command executed by `VimuxRunCommand`
|
2012-05-31 16:45:27 +00:00
|
|
|
>
|
2012-06-08 15:13:57 +00:00
|
|
|
" Run last command executed by VimuxRunCommand
|
2012-06-15 18:06:38 +00:00
|
|
|
map <Leader>vl :VimuxRunLastCommand<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxInspectRunner*
|
|
|
|
VimuxInspectRunner~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
Move into the tmux runner pane created by `VimuxRunCommand` and enter copy
|
2012-05-31 16:45:27 +00:00
|
|
|
pmode (scroll mode).
|
|
|
|
>
|
|
|
|
" Inspect runner pane map
|
2013-10-29 11:52:15 +00:00
|
|
|
map <Leader>vi :VimuxInspectRunner<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxCloseRunner*
|
|
|
|
VimuxCloseRunner~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
Close the tmux runner created by `VimuxRunCommand`
|
2012-05-31 16:45:27 +00:00
|
|
|
>
|
2012-06-08 15:13:57 +00:00
|
|
|
" Close vim tmux runner opened by VimuxRunCommand
|
2012-06-15 18:06:38 +00:00
|
|
|
map <Leader>vq :VimuxCloseRunner<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-06-08 15:13:57 +00:00
|
|
|
*VimuxInterruptRunner*
|
|
|
|
VimuxInterruptRunner~
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
Interrupt any command that is running inside the
|
|
|
|
runner pane.
|
|
|
|
>
|
|
|
|
" Interrupt any command running in the runner pane map
|
2013-10-29 11:52:15 +00:00
|
|
|
map <Leader>vs :VimuxInterruptRunner<CR>
|
2012-06-15 18:06:38 +00:00
|
|
|
<
|
|
|
|
|
|
|
|
|
2021-02-13 16:17:10 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxClearTerminalScreen*
|
|
|
|
VimuxClearTerminalScreen~
|
|
|
|
|
|
|
|
Clear the terminal screen of the runner pane.
|
|
|
|
>
|
|
|
|
" Clear the terminal screen of the runner pane.
|
|
|
|
map <Leader>v<C-l> :VimuxClearTerminalScreen<CR>
|
|
|
|
<
|
2012-06-15 18:06:38 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxClearRunnerHistory*
|
|
|
|
VimuxClearRunnerHistory~
|
|
|
|
|
2013-10-14 12:58:38 +00:00
|
|
|
Clear the tmux history of the runner pane for when
|
2012-06-15 18:06:38 +00:00
|
|
|
you enter tmux scroll mode inside the runner pane.
|
|
|
|
>
|
|
|
|
" Clear the tmux history of the runner pane
|
2013-10-29 11:52:15 +00:00
|
|
|
map <Leader>vc :VimuxClearRunnerHistory<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
<
|
|
|
|
|
2013-08-31 18:14:39 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxZoomRunner*
|
|
|
|
VimuxZoomRunner~
|
|
|
|
|
|
|
|
Zoom the runner pane. Once its zoomed, you will need
|
|
|
|
to use tmux "<bind-key> z" to restore the runner pane.
|
|
|
|
Zoom requires tmux version >= 1.8
|
|
|
|
>
|
|
|
|
|
|
|
|
" Zoom the tmux runner page
|
2014-03-21 07:42:48 +00:00
|
|
|
map <Leader>vz :VimuxZoomRunner<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
<
|
2012-04-11 15:05:08 +00:00
|
|
|
|
2014-09-21 00:33:49 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxRunCommandInDir*
|
|
|
|
VimuxRunCommandInDir~
|
|
|
|
|
|
|
|
Runs the specified command inside the directory of
|
|
|
|
the currently opened file. Takes two arguments. command and inFile
|
|
|
|
|
|
|
|
command: The command to run
|
|
|
|
inFile: If 1 the filename will be appended to the command
|
|
|
|
>
|
|
|
|
|
|
|
|
" Compile currently opened latex file to pdf
|
|
|
|
autocmd Filetype tex nnoremap <buffer> <Leader>rr :update<Bar>:call VimuxRunCommandInDir('latexmk -pdf', 1)<CR>
|
|
|
|
" Push the repository of the currently opened file
|
|
|
|
nnoremap <leader>gp :call VimuxRunCommandInDir("git push", 0)<CR>
|
|
|
|
<
|
|
|
|
|
2012-04-11 15:05:08 +00:00
|
|
|
==============================================================================
|
2012-05-31 16:45:27 +00:00
|
|
|
MISC (3) *VimuxMisc*
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxExampleKeybinding*
|
|
|
|
Full Keybind Example~
|
2012-04-11 15:05:08 +00:00
|
|
|
|
2012-05-31 16:45:27 +00:00
|
|
|
>
|
|
|
|
" Run the current file with rspec
|
2012-06-08 15:13:57 +00:00
|
|
|
map <Leader>rb :call VimuxRunCommand("clear; rspec " . bufname("%"))<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
" Prompt for a command to run
|
2013-04-03 18:03:57 +00:00
|
|
|
map <Leader>vp :VimuxPromptCommand<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
" Run last command executed by VimuxRunCommand
|
2013-04-03 18:03:57 +00:00
|
|
|
map <Leader>vl :VimuxRunLastCommand<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
|
2012-05-31 16:45:27 +00:00
|
|
|
" Inspect runner pane
|
2013-04-03 18:03:57 +00:00
|
|
|
map <Leader>vi :VimuxInspectRunner<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
|
2012-06-08 15:13:57 +00:00
|
|
|
" Close vim tmux runner opened by VimuxRunCommand
|
2013-04-03 18:03:57 +00:00
|
|
|
map <Leader>vq :VimuxCloseRunner<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
|
2012-05-31 16:45:27 +00:00
|
|
|
" Interrupt any command running in the runner pane
|
2013-04-03 18:03:57 +00:00
|
|
|
map <Leader>vx :VimuxInterruptRunner<CR>
|
2013-08-31 18:14:39 +00:00
|
|
|
|
|
|
|
" Zoom the runner pane (use <bind-key> z to restore runner pane)
|
|
|
|
map <Leader>vz :call VimuxZoomRunner()<CR>
|
2021-02-13 16:17:10 +00:00
|
|
|
|
|
|
|
" Clear the terminal screen of the runner pane.
|
|
|
|
map <Leader>v<C-l> :VimuxClearTerminalScreen<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
>
|
2012-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-05-31 16:45:27 +00:00
|
|
|
*VimuxTslimeReplacement*
|
|
|
|
Vimux as tslime replacement~
|
|
|
|
|
|
|
|
Here is how to use vimux to send code to a REPL. This is similar to tslime.
|
|
|
|
First, add some helpful mappings.
|
|
|
|
|
|
|
|
>
|
2013-04-03 18:03:57 +00:00
|
|
|
function! VimuxSlime()
|
2021-02-13 09:20:02 +00:00
|
|
|
call VimuxRunCommand(@v, 0)
|
2013-04-03 18:03:57 +00:00
|
|
|
endfunction
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
" If text is selected, save it in the v buffer and send that buffer it to tmux
|
2013-04-03 18:03:57 +00:00
|
|
|
vmap <LocalLeader>vs "vy :call VimuxSlime()<CR>
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
" Select current paragraph and send it to tmux
|
|
|
|
nmap <LocalLeader>vs vip<LocalLeader>vs<CR>
|
|
|
|
<
|
|
|
|
|
|
|
|
Now, open a clojure file. Let's say your leader is backslash (\). Type \vp,
|
|
|
|
and then type lein repl at the prompt. This opens a tmux split running a REPL.
|
|
|
|
Then, select text or put the cursor on a function and type \vs. This will send
|
2012-06-08 15:13:57 +00:00
|
|
|
it to the REPL and evaluate it. The reason we pass `0` to `VimuxRunCommand`
|
2012-05-31 16:45:27 +00:00
|
|
|
is to stop the normal return that is sent to the runner pane and use our own
|
|
|
|
new line so the clojure REPL will evaluate the selected text without adding an
|
|
|
|
extra return. Thanks to @trptcolin for discovering this issue.
|
|
|
|
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
CONFIGURATION (4) *VimuxConfiguration*
|
|
|
|
|
2021-02-16 13:51:49 +00:00
|
|
|
You can configure Vimux as follows. Note that all occurances of global
|
|
|
|
variables `g:Vimux...` may also be set using buffer variables `b:Vimux...` to
|
|
|
|
change the behavior of Vimux in just the current buffer.
|
2012-05-31 16:45:27 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxConfiguration_height*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.1 g:VimuxHeight~
|
2012-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
The percent of the screen the split pane Vimux will spawn should take up.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2012-04-11 15:05:08 +00:00
|
|
|
let g:VimuxHeight = "40"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2012-04-11 15:05:08 +00:00
|
|
|
Default: "20"
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-05-31 16:45:27 +00:00
|
|
|
*VimuxConfiguration_orientation*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.2 g:VimuxOrientation~
|
2012-04-11 15:05:08 +00:00
|
|
|
|
|
|
|
The default orientation of the split tmux pane. This tells tmux to make the
|
|
|
|
pane either vertically or horizontally, which is backward from how Vim handles
|
|
|
|
creating splits.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2012-04-11 15:05:08 +00:00
|
|
|
let g:VimuxOrientation = "h"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2012-04-11 15:05:08 +00:00
|
|
|
Options:
|
|
|
|
"v": vertical
|
|
|
|
"h": horizontal
|
|
|
|
|
|
|
|
Default: "v"
|
2012-04-12 10:29:48 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2014-01-12 01:28:56 +00:00
|
|
|
*VimuxConfiguration_use_nearest*
|
2021-03-08 00:17:53 +00:00
|
|
|
4.3 g:VimuxUseNearest~
|
2012-04-12 10:29:48 +00:00
|
|
|
|
2017-06-16 04:09:53 +00:00
|
|
|
Use existing pane or window (not used by vim) if found instead of running
|
2014-01-12 01:28:56 +00:00
|
|
|
split-window.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2017-09-21 08:52:04 +00:00
|
|
|
let g:VimuxUseNearest = 1
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2013-11-07 19:30:24 +00:00
|
|
|
Default: 1
|
2012-04-20 21:24:41 +00:00
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
2012-05-31 16:45:27 +00:00
|
|
|
*VimuxConfiguration_reset_sequence*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.4 g:VimuxResetSequence~
|
2012-04-20 21:24:41 +00:00
|
|
|
|
|
|
|
The keys sent to the runner pane before running a command. By default it sends
|
|
|
|
`q` to make sure the pane is not in scroll-mode and `C-u` to clear the line.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2017-09-21 08:52:04 +00:00
|
|
|
let g:VimuxResetSequence = ""
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2012-04-20 21:24:41 +00:00
|
|
|
Default: "q C-u"
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2012-10-18 20:57:59 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxPromptString*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.5 g:VimuxPromptString~
|
2012-10-18 20:57:59 +00:00
|
|
|
|
|
|
|
The string presented in the vim command line when Vimux is invoked. Be sure
|
|
|
|
to put a space at the end of the string to allow for distinction between
|
|
|
|
the prompt and your input.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2012-10-18 20:57:59 +00:00
|
|
|
let g:VimuxPromptString = ""
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2012-10-18 20:57:59 +00:00
|
|
|
Default: "Command? "
|
2012-05-31 16:45:27 +00:00
|
|
|
|
2014-01-12 00:31:25 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxRunnerType*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.6 g:VimuxRunnerType~
|
2014-01-12 00:31:25 +00:00
|
|
|
|
|
|
|
The type of view object Vimux should use for the runner. For reference, a
|
|
|
|
tmux session is a group of windows, and a window is a layout of panes.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2014-01-12 00:31:25 +00:00
|
|
|
let g:VimuxRunnerType = "window"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2014-01-12 00:31:25 +00:00
|
|
|
Options:
|
|
|
|
"pane": for panes
|
|
|
|
"window": for windows
|
|
|
|
|
|
|
|
Default: "pane"
|
|
|
|
|
2021-02-14 09:10:24 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxRunnerName*
|
2021-03-08 00:17:53 +00:00
|
|
|
4.7 g:VimuxRunnerName~
|
2021-02-14 09:10:24 +00:00
|
|
|
|
|
|
|
Setting the name for the runner. Works for panes and windows. This makes the
|
|
|
|
VimuxRunner reusable between sessions. Caveat is, all your instances (in the
|
2021-03-08 00:17:53 +00:00
|
|
|
same session/window) use the same window.
|
2021-02-14 09:10:24 +00:00
|
|
|
|
2021-03-08 00:17:53 +00:00
|
|
|
Caution: It is probably best not to mix this with |VimuxCloseOnExit|.
|
|
|
|
>
|
2021-02-14 09:10:24 +00:00
|
|
|
let g:VimuxRunnerName = "vimuxout"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2021-02-14 09:10:24 +00:00
|
|
|
Default: ""
|
|
|
|
|
2015-08-10 07:20:39 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxTmuxCommand*
|
2021-02-14 09:10:24 +00:00
|
|
|
4.8 g:VimuxTmuxCommand~
|
2015-08-10 07:20:39 +00:00
|
|
|
|
|
|
|
The command that Vimux runs when it calls out to tmux. It may be useful to
|
|
|
|
redefine this if you're using something like tmate.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2015-08-10 07:20:39 +00:00
|
|
|
let g:VimuxTmuxCommand = "tmate"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2015-08-10 07:20:39 +00:00
|
|
|
Default: "tmux"
|
|
|
|
|
2020-01-12 23:37:18 +00:00
|
|
|
------------------------------------------------------------------------------
|
2021-02-14 09:10:24 +00:00
|
|
|
*VimuxOpenExtraArgs*
|
|
|
|
4.9 g:VimuxOpenExtraArgs~
|
2020-01-12 23:37:18 +00:00
|
|
|
|
|
|
|
Allows addtional arguments to be passed to the tmux command that opens the
|
|
|
|
runner. Make sure that the arguments specified are valid depending on whether
|
|
|
|
you're using panes or windows, and your version of tmux.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2020-01-12 23:37:18 +00:00
|
|
|
let g:VimuxOpenExtraArgs = "-c #{pane_current_path}"
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
|
|
|
Default: ""
|
2020-01-12 23:37:18 +00:00
|
|
|
|
2021-02-23 12:35:38 +00:00
|
|
|
------------------------------------------------------------------------------
|
2021-03-08 00:17:53 +00:00
|
|
|
*VimuxExpandCommand*
|
2021-02-23 12:35:38 +00:00
|
|
|
4.10 g:VimuxExpandCommand~
|
|
|
|
|
|
|
|
Should the command given at the prompt via VimuxPromptCommand be expanded
|
|
|
|
using expand(). 1 to expand the string.
|
|
|
|
|
|
|
|
Unfortunately expand() only expands % (etc.) if the string starts with that
|
|
|
|
character. So the command is split at spaces and then rejoined after
|
|
|
|
expansion. With this simple approach things like "%:h/test.xml" are not
|
|
|
|
possible.
|
2021-03-08 00:17:53 +00:00
|
|
|
>
|
2021-02-23 12:35:38 +00:00
|
|
|
let g:VimuxExpandCommand = 1
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2021-02-23 12:35:38 +00:00
|
|
|
Default: 0
|
|
|
|
|
2021-03-07 23:58:20 +00:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
*VimuxCloseOnExit*
|
|
|
|
4.11 g:VimuxCloseOnExit~
|
|
|
|
|
2021-03-08 00:17:53 +00:00
|
|
|
Set this option to `1` or `v:true` to tell vimux to close the runner when you quit
|
2021-03-07 23:58:20 +00:00
|
|
|
vim.
|
|
|
|
|
2021-03-08 00:17:53 +00:00
|
|
|
Caution: It is probably best not to mix this with |VimuxRunnerName|.
|
|
|
|
>
|
2021-03-07 23:58:20 +00:00
|
|
|
let g:VimuxCloseOnExit = 1
|
2021-03-08 00:17:53 +00:00
|
|
|
<
|
2021-03-07 23:58:20 +00:00
|
|
|
Default: 0
|
|
|
|
|
2012-05-31 16:45:27 +00:00
|
|
|
==============================================================================
|
|
|
|
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:
|