Closed AlirezaMorsali closed 4 years ago
Hi @alirezamors, thanks for sharing! I think the best option for adding any sort of functionality like this would be captured in https://github.com/christoomey/vim-tmux-runner/issues/61 (Add operator for sending text). As much as possible I'd like to keep the plugin from having any special behavior directly implemented that can't be implemented outside the plugin, and I think the text object approach could potential solve this problem in a more general way.
With that in mind, I'm going to close this issue as I don't expect there is any work to be done here (beyond what's captured in the other issue).
I have been trying a few plugins for cell-mode and so far the best option for me was to use vim-tmux-runner sending lines to ipython. The way I use it is to select multiple lines and then by VtrSendLinesToRunner send them to ipython I think it could be very interesting if you could add a cell mode to this plugin. I found these functions in jupyter-vim plugin which will make it very easy to add this functionality.
`def is_cell_separator(line): """ Determine whether a given line is a cell separator """
TODO allow users to define their own cell separators
def run_cell(): """Run all the code between two cell separators""" cur_buf = vim.current.buffer (cur_line, cur_col) = vim.current.window.cursor cur_line -= 1