2

I have issues submitting my code when there are indentations in it because the code sample button doesn't detect the code unless it has exactly 4 spaces before it. Is there a quicker way to handle this instead of just manually clicking and deleting every indentation I see? This can take 10 minutes on long code.

Thank you!

3
  • Select the code block, then Ctrl-K. There is also gobs of help on the edit toolbar - click the ? Commented Jun 10, 2015 at 12:25
  • 2
    I might be wrong, but isnt this asking how to remove the extra indentations you often have when copying code from an IDE, rather than how to add them?
    – Jamiec
    Commented Jun 10, 2015 at 12:27
  • As an aside, if it's taking you 10 minutes to indent/outdent your code, you may be including too much code. Depends on how fast you delete :) Commented Jun 10, 2015 at 17:47

1 Answer 1

1

There is a curly brace button in the top of the editor that if you highlight your code and press it it will indent the selection for you.

enter image description here

You can also highlight your code and use ctrl+K

You can go here to see the help page for using the editor.

3
  • Ahh, for some reason the first time I tried this it just didn't work, but it's working now! This was a silly question then on my part! Sorry. I can't even accept your answer because I only have 13 reputation
    – JGoldz75
    Commented Jun 10, 2015 at 12:29
  • @JGoldz75 No problem. Everyone can use some help now and again. Besides I think you can accept an answer at any reputation it just makes you wait so long before you can accept it. Commented Jun 10, 2015 at 12:30
  • Ahh I can accept an answer it looks like, just cannot upvote! Answer accepted.
    – JGoldz75
    Commented Jun 10, 2015 at 12:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .