Created
August 18, 2015 16:10
-
-
Save vsbuffalo/12b19045028377920a49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augroup Terminal | |
au! | |
au TermOpen * let g:last_terminal_job_id = b:terminal_job_id | |
augroup END | |
function! REPLSend(lines) | |
call jobsend(g:last_terminal_job_id, add(a:lines, '')) | |
endfunction | |
command! REPLSendLine call REPLSend([getline('.')]) | |
command! REPLSendLines call REPLSend(getline("'<", "'>")) " this doesn't work | |
nnoremap <c-l> :REPLSendLine<cr> | |
inoremap <c-l> :REPLSendLine<cr> | |
vnoremap <c-l> :REPLSendLines<cr> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment