Skip to main content
🍎
Source Link
iBug
  • 37.1k
  • 1
  • 51
  • 85

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backticks.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust```rust or ```python```python.

pub fn main() {}
def main(): pass

With indented code blocks you have to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backticks.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you have to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backticks.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you have to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

added 6 characters in body
Source Link
Ted Klein Bergman
  • 9.7k
  • 2
  • 12
  • 18

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backtickbackticks.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you have to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backtick.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backticks.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you have to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

added 582 characters in body
Source Link
Ted Klein Bergman
  • 9.7k
  • 2
  • 12
  • 18

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backtick.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Working with indentation as formatting is a very annoying experience and it's clear that new users have a problem with it. Also, many users seem to be in support for triple-backticks.

There are many reasons for it to be the default.

You cannot hint the language with indented code blocks as easily as with triple-backtick.

There are questions that require code blocks in multiple languages, which is very easy and straight-forward with triple-backticks, by adding the language just after the ticks e.g. ```rust or ```python.

pub fn main() {}
def main(): pass

With indented code blocks you to rely on somewhat obscure and deprecated HTML inlining, e.g. <!-- language: rust --> or <!-- language: python -->.

You cannot easily put two code blocks after each other

If you have one indented code block directly followed by another code block, they'll be merged into one. This makes the example I showed above confusing (along with wrong highlighting):

pub fn main() {}

def main(): pass
If you indent your code properly but accidentally forget an empty line in-between the text and the code, it'll not work.

When you get told that the code needs to be indented in order to be formatted as a code block, it can be a bit annoying and confusing when there are these additional rules.

This is text. This is indented text one line below.

This is text.

This is indented text two lines below.
It's slightly more annoying to insert code in an already existing code block.

Since I can't insert with tab, I'll have to insert with 4 spaces. If the code is indented, then I have to spam 4 extra spaces for every line I want to insert. And if I want to break up the code in two lines I'll have to make sure to indent the other line also to not mess up the formatting.

Backticks are what is used in the comments.

This will give more consistency and hint people on how to format code in the comment section.


Overall, the triple-backtick option is more convenient and easier for many people, and I think that it would be beneficial for many new users to properly format their code and for editors to fix bad formatting. Therefore, it should be the preferred default when using the GUI button or using the hotkey to create code sample.

Remove inaccurate statements regarding syntax highlighting. I'm fine with having something that says that it's not as easy, or that the <!-- language: lang-foo --> is deprecated, but let's not propagate inaccurate information.
Source Link
Makyen Mod
  • 33.2k
  • 14
  • 114
  • 119
Loading
added 150 characters in body
Source Link
Ted Klein Bergman
  • 9.7k
  • 2
  • 12
  • 18
Loading
added 13 characters in body
Source Link
Ted Klein Bergman
  • 9.7k
  • 2
  • 12
  • 18
Loading
Became Hot Meta Post
Source Link
Ted Klein Bergman
  • 9.7k
  • 2
  • 12
  • 18
Loading