vimrepl
This commit is contained in:
parent
5840299a65
commit
05f5054507
|
@ -0,0 +1,6 @@
|
|||
To use vim as a repl, copy the attached script file into ~/.vim/plugins.
|
||||
|
||||
Start a tmux session and split the pane. Start nforth in the first pane. Start vim in the second pane, and edit a source file of your choice.
|
||||
|
||||
Place the cursor onto a paragraph. C-c C-c will send the paragraph into nforth.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
let g:tmux_target = "%0"
|
||||
|
||||
function Send_to_Pane(text)
|
||||
echo system("tmux send-keys -t " . g:tmux_target . " '" . substitute(a:text, "'", "'\\\\''", 'g') . "'")
|
||||
endfunction
|
||||
|
||||
vmap <C-c><C-c> "ry :call Send_to_Pane(@r)<CR>
|
||||
nmap <C-c><C-c> vip<C-c><C-c>
|
Loading…
Reference in New Issue