First time here? Check out the FAQ!

Ask Your Question
1

How to disable auto-indentation on text mode interface?

asked 13 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 13 years ago

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.

Preview: (hide)
link

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: 13 years ago

Seen: 2,013 times

Last updated: Jan 26 '12