tacocats
3/19/2017 - 6:28 AM

Run code by sending it to a tmux session

Run code by sending it to a tmux session

" External command '!tmux' and its parameters are wrapped in :execute so it is run properly
" -t 0.1 is the tmux session and window name, this needs to be changed to whatever session/window you want to send it to
" | is used to run the :redraw! command after code is executed, since vim's buffer graphically glitches and needs to be redrawn

:execute  "silent !tmux send -t 0.1 'ruby test.rb' Enter" | :redraw!