Profile picture Schedule a Meeting
c a n d l a n d . n e t

Send Commands From VIM to Tmux Pane

Dusty Candland | | tmux, vim

I've started using Tmux w/ VIM as my primary work flow. I installed the tslime.vim plugin, which will send highlighted commands to another pane, but I wanted to send ad-hoc commands, like :!. I added this function to the tslime.vim file, I'm sure there is a better way, but that's what I did for now.

function! To_Tmux() let b:text = input("tmux:", "", "custom,") call Send_to_Tmux(b:text . "\r") endfunction

cmap tt :call To_Tmux()

This will allow me to type :tt and then any needed commmand, like rake. The tslime plugin will ask which pane number, then send the command to that pane from then on. The selected pane can be changed with <C-c>v.

my forked tslime

Webmentions

These are webmentions via the IndieWeb and webmention.io. Mention this post from your site: