christoomey / vim-tmux-runner

Vim and tmux, sittin' in a tree...
MIT License
291 stars 37 forks source link

VtrSendCommand Should Optionally Not Clear #29

Open toomey8 opened 9 years ago

toomey8 commented 9 years ago

For R use case below, I would want the r REPL to not clear

function! WrapRVarAndSend(wrapper)
 let command = a:wrapper . '(' . expand('<cword>') . ')'
 call VtrSendCommand(command)
endfunction

nnoremap <localleader>c :call WrapRVarAndSend('class')<cr>
nnoremap <localleader>l :call WrapRVarAndSend('length')<cr>
nnoremap <localleader>h :call WrapRVarAndSend('head')<cr>