sponsor Vim development Vim logo Vim Book Ad

tslime.vim : Send commands to a tmux repl session via vim.

 script karma  Rating 0/0, Downloaded by 155    Comments, bugs, improvements  Vim wiki

created by
Christian Brauner
script type
This is a simple vim script to send portion of text from a vim buffer to a running tmux session.

(1) This fork provides the ability to send multiple keys to a tmux target at once.

(2) The tmux target is set on buffer basis. This means that every tab in Vim can have its own tmux target. (E.g. you could have a tab in which you edit a Python script and send text and keys to a Python repl and another tab in which you edit an R script and send text and keys to an R repl.)

(3) This fork allows you to refer to panes either via their dynamic identifier which is a simple number. Or via their unique identifier which is a number prefixed with %.

a) Demonstrative Reference/Dynamic Reference: If you choose to refer to a pane via its dynamic identifier the target of any given send function in this script will change when you insert a new pane before the pane you used.

b) Proper Name/Static Reference: If you choose to refer to a pane via its unique identifier the target of any given send function in this script will stay fixed.

Tip: You can find out the unique identifier of a pane by either passing tmux list-panes -t x where x is the name of the session. Or (the easier way) you let the unique identifier of every pane be shown in your tmux status bar with the option #D; e.g.: set -g status-left #D. (All possible options about what to display in the statusbar can be found via man tmux or some internet searching.)

(4) In this fork of tslime.vim, keybindings are not set automatically for you. Instead, you can map whatever you'd like to one of the plugin-specific bindings in your .vimrc file.

The script can also be found on Github: https://github.com/lord-garbage/tslime.vim
install details
Put in your plugin folder.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
tslime.vim 1.4 2014-07-20 7.0 Christian Brauner Enabling clean exit with `ESC` when setting `TmuxVars`.
tslime.vim 1.3 2014-05-06 7.0 Christian Brauner add option to refer to a pane by its unique identifier
tslime.vim 1.2 2014-05-02 7.0 Christian Brauner insert additional shortcut for "C-] C-c i" instead of "C-l" alone for bash vi editing mode
tslime.vim 1.1 2014-04-29 7.0 Christian Brauner Fixed E677 error when ESC was used to stop SendToTmuxPrompt() function.
Deleted function that was unused but still in the code.
tslime.vim 1 2014-04-28 7.0 Christian Brauner Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo