Skip to main content
20 votes
Accepted

What to do with <!-- language: bash --> edits?

Yes, syntax highlighting of anything more than a couple of lines is a readability improvement. While the software used to apply syntax highlighting isn't all that great, it has rendered obvious some ...
muru's user avatar
  • 199k
18 votes

What to do with <!-- language: bash --> edits?

Just look at the examples. Does it matter? If you are used to read syntax highlighting in a specific language: YES The other way around, on e.g. a .desktop file, (default bash) highlighting can be ...
Jacob Vlijm's user avatar
10 votes

Community consensus regarding using backticks or 4 spaces for code

My personal preference is to use the triple backtick as that's the most common way to set code blocks in Markdown outside of Stack Exchange. I find it much easier to use. When I am editing someone ...
Dan's user avatar
  • 13.2k
9 votes

Automatically wrapping lines in Ask Ubuntu

Click the gray circle with a question mark inside it in the upper right corner of the Ask Ubuntu markdown editor to show the link for advanced help (in red letters) which tells all the rules for ...
karel's user avatar
  • 116k
8 votes

Code Block Limit of 30000 characters

Unless a new code-block-specific limit has been introduced recently (and not talked about), the limit is for the whole post, not specifically for a code block. If you pasted code in and didn't hit the ...
Eliah Kagan's user avatar
8 votes

What to do with <!-- language: bash --> edits?

Here's just my 2-cents on this: color highlighting improves clarity and readability of code, hence improves clarity and readability of the edited post, makes it easier to read (related post). they're ...
Sergiy Kolodyazhnyy's user avatar
7 votes
Accepted

How to properly add code in comment

In comments you are limited to just test test which is generated by the code: `test test` There is no way to get the larger code bar like in your example or in the line above this in a comment. ...
Thomas Ward's user avatar
  • 75.4k
5 votes

Presentation of code should include explanation in a separate comment section

My two cents to just those two points you raised: users may mistakenly take in code comments as part of the provided solution The syntax highlighting prevents that very well, for example: #!/bin/...
dessert's user avatar
  • 40.1k
4 votes
Accepted

How do I use the grey formatting in a comment?

I was using the wrong character. I thought the directions said to use the apostrophe character ( ' ) but they said to use the backtick character ( ` ) which was a subtle difference that I wasn't ...
XqRG's user avatar
  • 1
4 votes

What to do with <!-- language: bash --> edits?

I also came across edits of this type and treated them as follows: Approve if the edit actually improved the post by triggering correct syntax highlighting while it wasn't possible to just add a tag, ...
dessert's user avatar
  • 40.1k
4 votes

Community consensus regarding using backticks or 4 spaces for code

Just like Dan, I don’t think we need a consensus. In your posts, use whatever you want (but keep the difference of in-line vs. block code formatting as Mark Kirby noted). However, if I edit someone ...
Melebius's user avatar
  • 11.5k
3 votes

Community consensus regarding using backticks or 4 spaces for code

I don't think it makes any difference at all. I am very used to the 4-spaces indentation, my muscle memory works that way and there is a nifty userscript that means I can indent by just selecting text ...
terdon's user avatar
  • 101k
3 votes

Community consensus regarding using backticks or 4 spaces for code

I actually know of five ways to format code on SE, not including the editor button (click edit to see): back ticks html four spaces blocks using back ticks blocks using tilde I know, that is even ...
Mark Kirby's user avatar
  • 18.6k
2 votes
Accepted

How to write the grave accent to add code in the comment section?

As far as I can see, the ` is the top left standard key (to the left of the 1) on both US an UK keyboards. Images from Wikipedia. UK Keyboard: US Keyboard:
Artur Meinild's user avatar
1 vote

Presentation of code should include explanation in a separate comment section

I think people not explaining what code does is a much bigger problem on this site than code comments being unwieldy. My first question about your feature request would be does it make it more ...
Zanna's user avatar
  • 70.7k

Only top scored, non community-wiki answers of a minimum length are eligible