Skip to content

Instantly share code, notes, and snippets.

@vimyum
Created October 26, 2017 13:01
Show Gist options
  • Save vimyum/c33db04b47ca2c5a3dab5f574d19dc07 to your computer and use it in GitHub Desktop.
Save vimyum/c33db04b47ca2c5a3dab5f574d19dc07 to your computer and use it in GitHub Desktop.
send sentence from vim to below tmux pane.
function! SendBottomV() range
let l:selected = getline(a:firstline, a:lastline)
let result = system("tmux send -t bottom \"". join(l:selected,'\n') ."\n\" 2>&1 | cat")
endfunction
function! SendBottom()
let result = system("tmux send -t bottom \"". getline(".") ."\n\" 2>&1 | cat")
endfunction
function! ClearBottom()
let result = system("tmux send -t bottom \"^L\" 2>&1 | cat")
endfunction
function! BsBottom()
let result = system("tmux send -t bottom \"^U\" 2>&1 | cat")
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment