vim-slime icon indicating copy to clipboard operation
vim-slime copied to clipboard

is there a way to make the cursor move to next line?

Open pinggit opened this issue 2 years ago • 5 comments

after sending some lines, the expected behavior is the cursor moving forward so next line(s) can be send. currently the cursor always stay at the original position. is there a way to make the cursor moving forward to the next line?

pinggit avatar Jun 12 '22 01:06 pinggit

Hi @pinggit

Have a look at this binding from my dotfiles.

ctrl c, enter -- send the current paragraph and moves the cursor past it. You can modify to accommodate your needs.

Let me know how that goes.

jpalardy avatar Jun 12 '22 05:06 jpalardy

Thanks for the trick.
right now I have disabled the default mapping and use these 2 maps,
first map for single line, 2nd map for visual mode. they work.

nmap ,ss :SlimeSend<CR>j
vmap ,ss :SlimeSend<CR>,>j

but how to make it work for SlimeParagraphSend? right now I use this map to send a paragraph

nmap ,sp <Plug>SlimeParagraphSend

by the way in your example I see:

nmap <c-c><c-l> :SlimeSend0 ""<CR>
nmap <c-c><c-u> :SlimeSend0 "\x15"<CR>
nmap <c-c>q     :SlimeSend0 "q"<CR>
nmap <c-c><cr>  <c-c><c-c>}j

nmap <c-c>d <Plug>SlimeSendCell

but in my vim I only see SlimdeSend1 and SlimeSend maybe I'm running an older version?

pinggit avatar Jun 15 '22 15:06 pinggit

They are both defined here.

jpalardy avatar Jun 17 '22 05:06 jpalardy

That is truly helpful, thanks @jpalardy.

storopoli avatar Jul 24 '22 09:07 storopoli

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 13 '22 02:11 stale[bot]