Ask Your Question

How to disable auto-indentation on text mode interface?

asked 2012-01-25 06:44:36 -0600

Gro-Tsen gravatar image

The auto-indentation feature is meant to be friendly, but it actually seriously messes up with copypasting bits of Sage or Python code from text files. Is there some way it can be disabled (ideally: reversibly disabled) so I can copy pre-indented text?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-01-26 06:12:18 -0600

kcrisman gravatar image

I just learned something - it turns out you CAN do this very easily!

sage: def f(x):
....:         return x^2
sage: %autoindent
Automatic indentation is: OFF
sage: def f(x):
....:     return x^2

See the IPython documentation for more info, including some warnings. I'm not sure exactly what rc files Sage obeys for its own IPython.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-01-25 06:44:36 -0600

Seen: 1,145 times

Last updated: Jan 26 '12