IndentationError: unindent does not match any outer indentation level (Extra spaces produced in IPython)
Akramz opened this issue · 3 comments
Akramz commented
This works perfectly fine ;
vim -
for i in range(1):
for j in range(1):
print 'Hello'
IPython [Using SlimuxREPLSendSelection] -
In [54]: for i in range(1):
....: for j in range(1):
....: print 'Hello'
....:
Hello
*Notice the spaces in my second indentation.
So when i try to indent back and do anything -
vim -
for i in range(1):
for j in range(1):
print 'Hello'
print 'BUG!'
IPython -
In [55]: for i in range(1):
....: for j in range(1):
....: print 'Hello'
....: print 'BUG!'
....:
File "<ipython-input-55-007af182e978>", line 4
print 'BUG!'
^
IndentationError: unindent does not match any outer indentation level
If you want to paste code into IPython, try the %paste and %cpaste magic functions.
IPython version : 4.2.1
vim version : 7.4
Any help would be appreciated, I really want to continue using Slimux.
Thank you.
Akramz commented
I solved the problem by disabling auto indent in IPython (%autoindent).
CermakM commented
I have this issue as well, how again did you solve it?
%autoindent OFF
in IPython does not solve the issue for me
$ipython3 --version
6.2.1
$vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 11 2017 09:54:39)