What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Possible Duplicate:
How do I format my code blocks?

There has got to be a better way of adding code blocks than adding 4 spaces to EACH line. I have seen <pre><code> tags before, but they don't work when using #include <someheader>. Have I missed something?

share|improve this question

marked as duplicate by Arjan, balpha Jul 14 '12 at 12:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5  
"Have I missed something?" Er...the {} button? –  dmckee Jul 14 '12 at 4:38
    
Indeed I have. I've missed it for 10+ months now. –  Drise Jul 14 '12 at 4:58
    
Shameless plug: stackapps.com/questions/3247/… –  balpha Jul 14 '12 at 12:14

1 Answer 1

up vote 2 down vote accepted

You use the { } button - highlight the lines of code you want to turn into a code block, and hit the button.

enter image description here

Here is code on line one
Here is code on line two

There is also a ? button at the top right of the textbox, you can click on that for more formatting help.

share|improve this answer
    
I honestly I have never seen this. Is this new? –  Drise Jul 14 '12 at 4:39
    
@Drise definitely not. –  Aaron Bertrand Jul 14 '12 at 4:39
    
@Drise See my comment on the question immediately preceding yours. Admittedly long ago it was called the 0101010101010101010101 button. But that was harder to type. –  dmckee Jul 14 '12 at 4:56
    
Also, select the whole block and press Ctrl+K (on Windows) –  Damien Pirsy Jul 14 '12 at 10:40

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