[closed] Copy / pasting code written in Sublime Text to the web interpreter

Hello folks,

Does anybody use Sublime Text 2 to write his homework code, then paste it in the online interpreter ?
Every time I do, it breaks indentation and I have to manually indent again my code.

Any workaround would be appreciated! :-)

asked 07 Apr '12, 15:43

Gregoire%20Gilbert-1's gravatar image

Gregoire Gil...
2132512
accept rate: 40%

closed 07 Apr '12, 16:05

The question has been closed for the following reason "The question is answered, right answer was accepted" by Gregoire Gilbert-1 07 Apr '12, 16:05


2 Answers:

I just started using Sublime Text 2 and I noticed that its default settings don't convert tabs to spaces. You'll want to turn that on. Tabs can cause big problems with python.

link

answered 07 Apr '12, 15:51

JFreegman's gravatar image

JFreegman
4.3k62155

Thank you! I just figured that out right before checking for answer on the thread :-)

(07 Apr '12, 16:02) Gregoire Gil... Gregoire%20Gilbert-1's gravatar image

I've been using Sublime Text 2 for some time now.
I don't have that problem.

If what @JFreegman does not help try saving your document with a .py extension.
Then copy/paste.

link

answered 07 Apr '12, 16:01

dedos's gravatar image

dedos
1.4k132230

Thank you for your answer, @JFreegman was right!

(07 Apr '12, 16:02) Gregoire Gil... Gregoire%20Gilbert-1's gravatar image

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,276
×164
×2

Asked: 07 Apr '12, 15:43

Seen: 321 times

Last updated: 07 Apr '12, 16:05