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 Sep 8, 2014
1 parent be6b83c commit cb4654c
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 @@ -45,7 +45,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 cb4654c

Please sign in to comment.