vim-tbone
vim-tbone copied to clipboard
Python needs newlines until the final line in the selection
When sending text to an IPython REPL in tmux, the interpreter needs the \rs at the end of each line. Because the plugin converts newlines to carriage returns, it's only possible to send one line at a time.
Is there some way to configure the plugin to only replace the newline at the end of the range with <CR> if it's a Python file?
The interpreter needs carriage returns and the interpreter gets carriage returns. Not seeing a problem there. Is it the removal of leading whitespace that is tripping you up?
Hi @rzpilgrim,
Sorry for bumping this quite-old issue. For your use case, you could use one of iPython's magic commands: %cpaste lets you enter raw input while %paste executes the content of the system clipboard. You can check iPython docs for more info. You can write a wrapper around @tpope 's plugin or set something like this in your .vimrc:
vnoremap <leader>p "+y :silent execute "!tmux send-keys -t top-right \\\%paste C-J"<CR><C-L>