Ask Your Question
1

How to disable auto-indentation on text mode interface?

asked 2012-01-25 13:44:36 +0100

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
2

answered 2012-01-26 13:12:18 +0100

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

Stats

Asked: 2012-01-25 13:44:36 +0100

Seen: 1,982 times

Last updated: Jan 26 '12