Skip to content

Commit

Permalink
Tmux buffers for sending text
Browse files Browse the repository at this point in the history
  • Loading branch information
t6d committed Jul 21, 2015
1 parent a1db730 commit 0628551
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugin/vimux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ function! VimuxRunCommand(command, ...)
endfunction

function! VimuxSendText(text)
call VimuxSendKeys('"'.escape(a:text, '"$').'"')
if exists("g:VimuxRunnerIndex")
call system("tmux load-buffer -", a:text)
call system("tmux paste-buffer -t " . g:VimuxRunnerIndex)
else
echo "No vimux runner pane/window. Create one with VimuxOpenRunner"
end
endfunction

function! VimuxSendKeys(keys)
Expand Down

0 comments on commit 0628551

Please sign in to comment.