Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndentationError: unindent does not match any outer indentation level (Extra spaces produced in IPython) #73

Closed
Akramz opened this issue Mar 19, 2017 · 3 comments

Comments

@Akramz
Copy link

Akramz commented Mar 19, 2017

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
Copy link
Author

Akramz commented Mar 20, 2017

I solved the problem by disabling auto indent in IPython (%autoindent).

@Akramz Akramz closed this as completed Mar 20, 2017
@CermakM
Copy link

CermakM commented Jan 6, 2018

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)

@zcesur
Copy link

zcesur commented Feb 5, 2018

@CermakM See #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants