Closed Edenhofer closed 2 years ago
Can you try to add
let g:slime_python_ipython = 1
to your config and try again? If it works, I'll add it to the README. See this page for more information: https://github.com/jpalardy/vim-slime/blob/a522fed677e50175f52efc5848cc35209af33216/ftplugin/python/README.md
With g:slime_python_ipython = 1
the above snippet works. However, I can't paste blocks which have a global indentation then. Plain old %cpaste
still works though.
EDIT: Unfortunately, this again does not reproduce on a simple example. The above code with everything intended however consistently errors out for me.
I've added a workaround for the problem with global indentations, can you update the plugin and let me know if it works as expected now?
The new line trick seems to work like a charm! Many thanks :)
Awesome! :)
The following snippet produces a syntax error even though the code is valid. This is to say, neither ipython nor python complain about the syntax if run as is. However, if I let vim-ipython paste the snippet into an interactive ipython session using
IPythonCellExecuteCellVerboseJump
, it fails to execute the cell correctly and instead printsSyntaxError: 'return' outside function
for the last return. Unfortunately, I was unable to strip down the reproducing example further. If I remove any line in the cell, it starts to work again. Likewise, the error does not reproduce if I use plaincpaste
in ipython.My slime config is as follows: