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

Execute selection and then move cursor to next line of selection

Open zippeurfou opened this issue 7 years ago • 5 comments

It would be nice to have an alternative to CTRL + C that goes to the next line of the selection.

zippeurfou avatar Sep 26 '18 19:09 zippeurfou

Thanks for the suggestion !

So you would like to run a selection line by line ? Ctrl-C currently runs the whole selection (doesn't it ?), so you can't really go to the next line of selection after that.

Or did I misunderstand something ?

julienr avatar Sep 28 '18 19:09 julienr

I would like to run current selection and then go to the next line (down) instead of going back to the beginning of the selection as it currently dows. The same way nvim-R does \d https://github.com/jalvesaq/Nvim-R/blob/master/doc/Nvim-R.txt#L382 Current behavior https://cl.ly/b23166eabab6 And what behavior I'd like (example using R): https://cl.ly/367b972d2b35 The behavior is different as after executing the selection it goes to the next line. Let me know if this is not clear enough.

zippeurfou avatar Sep 28 '18 20:09 zippeurfou

Ah ok, make sense ! Then yes, I agree it would be a nice addition. I can't promise anything because I'm quite busy currently, but if you feel like doing a PR, please go ahead :)

julienr avatar Oct 17 '18 18:10 julienr

Thanks @julienr, I wonder if we could just do a shortcut somehow that invoke CTRL-C as a quick hack at least.

zippeurfou avatar Oct 17 '18 18:10 zippeurfou

Yeah I guess it would be a matter of writing another function that calls RunTmuxPythonChunk and then goes to the next line. I'm actually pretty bad at vimscript, so I don't even know how to go to the next line, but something like simulating a j should do.

julienr avatar Oct 19 '18 07:10 julienr