It would really be useful if Stack Overflow supported GitHub's style of triple backticks for code blocks.
Current Stack Overflow requires indenting every line. That means if I have code like this:
this
is
my
code
I have to manually indent every line with 4 spaces. That mean I can't just copy and paste code from my text editor, I have to reformat it first like this
this
is
my
code
In my editor that means I end up modifying the file, which is lame. Or I need to copy and paste the code into another file just so I can modify it. Worse, if I'm using JavaScript I might just be copying and pasting directly out of the browser or from JSFiddle, CodePen, etc. which means it's even more annoying and time wasting to have to go first paste that into my editor or to have to hand edit each and every line in Stack Overflow.
Triple backticks solve this issue. I just put triple backticks before and after the code like this:
```
this
is
my
code
```
And it should show up like this
this
is
my
code
No need to manually edit the identation. GitHub supports this extension to markdown and it's super useful.
Could Stack Overflow please consider adding something similar?
Esc
+mzggVG>'z
copy the code you want to paste here and thenu'z
. Couldn't be simpler. By the way: you can already use triple backticks for inline code. It's useful to typeset a single backslash:\
. Otherwise you end up with: ``. This also means that what you are requesting isn't backward compatible...