Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use file and readreg to fix "stuff" limitations

  • Loading branch information...
commit feebbf09d60ea7864f36c15b36383471af087b45 1 parent d0cea52
@jpalardy jpalardy authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 plugin/slime.vim
View
9 plugin/slime.vim
@@ -12,13 +12,18 @@ if !exists("g:slime_target")
let g:slime_target = "screen"
end
+if !exists("g:slime_paste_file")
+ let g:slime_paste_file = "$HOME/.slime_paste"
+end
+
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Screen
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! s:ScreenSend(config, text)
- let escaped_text = substitute(shellescape(a:text), "\\\\\\n", "\n", "g")
- call system("screen -S " . shellescape(a:config["sessionname"]) . " -p " . shellescape(a:config["windowname"]) . " -X stuff " . escaped_text)
+ call system("cat > " . g:slime_paste_file, a:text)
+ call system("screen -S " . shellescape(a:config["sessionname"]) . " -p " . shellescape(a:config["windowname"]) . " -X readreg p " . g:slime_paste_file)
+ call system("screen -S " . shellescape(a:config["sessionname"]) . " -p " . shellescape(a:config["windowname"]) . " -X paste p")
endfunction
function! s:ScreenSessionNames(A,L,P)
Please sign in to comment.
Something went wrong with that request. Please try again.