Skip to content

Instantly share code, notes, and snippets.

@costis
Last active October 12, 2015 12:17
Show Gist options
  • Save costis/4025267 to your computer and use it in GitHub Desktop.
Save costis/4025267 to your computer and use it in GitHub Desktop.
Send to Tmux from Vim
map <f9> :silent !tmux send-keys -t left 'ruby %' C-m<cr>
map <Leader>rl :silent !tmux send-keys -t right 'ruby %' C-m<cr>
# Clear screen and redrew Vim buffer.
map <Leader>aa :silent !tmux send-keys -t right 'clear; ruby %' C-m<CR>:redraw!<CR>
# Send current buffer to Ruby
nnoremap <leader>g :execute "!tmux send-keys -t bottom 'clear; ruby '" . expand('%:p') . "\r"<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment