{motion} Send to REPL
joshdpark opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
This is more out of convenience than anything. Currently I just do a motion selection (such as vip
to select inside a paragraph) and then use :TREPLSendSelection
to send it to the repl.
Describe the solution you'd like
It just feels more "vim-like" to be able to do things with motion
Additional context
I see in the neoterm.vim
file that there is a <Plug>(neoterm-repl-send)
. I just don't know how to set it up in init.vim
with motion.
You almost got there, you just have to map a key to it, such as s
in my case:
nmap s <Plug>(neoterm-repl-send)
Which makes it vim-like, i.e. sip
sends a paragraph, siw
a word etc.
Also in addition, I often submit several paragraphs in succession, which can be sped up using vim-repeat. I.e. defining the following gives you the map sp
, which submits the current paragraph and advances to the next ({
), once done, pressing .
repeats the whole process with one stroke.
nmap <silent> <Plug>SendPara sip} :call repeat#set("\<Plug>SendPara")<CR>
nmap <silent>sp <Plug>SendPara