Open jlc-backsbag opened 1 year ago
Hi @jlc-backsbag
Thanks for reporting this ☝️
I'm not a ipython user myself — let's keep this open and see if other users want to chime in.
@jlc-backsbag can you try manually typing '--' and press enter (twice if required) after the %cpaste -q
?
I can reproduce OP's error with ipython 8.12.0 and tmux.
Entering --
+ Enter after %cpaste -q
results in SyntaxError: invalid syntax
.
Switching to ipython 7.34.0, the latest ipython 7 version, solved the issue.
In my case, I have solved it for ipython 8.12.0 by checking https://github.com/jpalardy/vim-slime/tree/main/ftplugin/python i.e., eating a big spoon of RTFM :)
An educated guess for the cause is the tmux+ipython setup. Haven't tried with other multiplexers, though.
The solution was to change let g:slime_python_ipython = 1
to let g:slime_bracketed_paste = 1
in the vim config file. For nvim with a lua config, it's vim.g.slime_bracketed_paste = 1
in init.lua
.
@jlc-backsbag maybe this will solve it for you, too :)
I have a problem where when using slime to send any text to an iPython shell, the
%cpaste -q
gets sent but then the console gets stuck. The only way to get out is with ctrl-c and then I get this error message:The problem does not occur with iPython 7.31.1, which is the version I ended up downgrading to. A version that it doesn't work in is 8.9.0.
Not sure if this is vim-slime problem or an ipython problem..