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

Cannot turn off autoindent at cli in Ipython 6 #11257

Closed
williamjameshandley opened this issue Aug 7, 2018 · 5 comments

Comments

@williamjameshandley
Copy link

commented Aug 7, 2018

running

ipython --no-autoindent

does not turn off autoindentation.

neither does running

In[1] %autoindent%
autoindent is deprecated since IPython 5: you can now paste multiple lines without turning autoindentation off.
Automatic indentation is: OFF

in the ipython interpreter.

I would like to be able to turn off autoindentation for the purposes of sending text to ipython in a sendkeys-like interface for this project. Currently the only way I have of doing this is to start ipython in

ipython --simple-prompt

but then I lose functionality like coloring/autocompletion.

@Carreau

This comment has been minimized.

Copy link
Member

commented Aug 28, 2018

Does something like https://github.com/ipython/rlipython fit your needs ?
My guess is you actually want to bypass all the IPython Gui and just send code to be executed.

@williamjameshandley

This comment has been minimized.

Copy link
Author

commented Aug 29, 2018

Unfortunately this doesn't seem to fix my issue, as when I try start ipython with
ipython --TerminalIPythonApp.interactive_shell_class=rlipython.TerminalInteractiveShell, and then try to send either individual lines, or multiple lines at once via vim's term_send_keys, ipython still tries to insert additional tabs

@Carreau

This comment has been minimized.

Copy link
Member

commented Aug 29, 2018

Does #11273 fit your needs ?

@williamjameshandley

This comment has been minimized.

Copy link
Author

commented Aug 29, 2018

Yes! That seems to fix all my use cases just by passing --no-autoindent. Many thanks for looking into this

@Carreau

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

Closed by #11273

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.