Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [code-formatting]

The tag has no usage guidance.

2
votes
0answers
107 views

Preformatted text horizontal scrolling - bug or feature?

AskUbuntu help recommend to style pre-formatted text and console output with #four spaces But sometimes it results in scrolling text. See this question as an example. The problematic line (as ...
3
votes
0answers
42 views

Syntax highlighting doesn’t work on meta

When I enter <!-- language-all: lang-bash --> if :; then echo "quoted"; fi in a post on main, the output looks like this: Here on meta, the very same code gets no syntax highlighting at ...
-3
votes
2answers
60 views

Presentation of code should include explanation in a separate comment section

This is just an idea and I would like to see what the feedback is. The problem Starting Linux I've found myself many times looking through example code on this site and finding out what it actually ...
5
votes
1answer
69 views

How do I use the grey formatting in a comment? [duplicate]

Someone showed me (by editing my question for me) how to make some of your text show up grey to show it is code. Now I need to know how to do it in a comment.
7
votes
1answer
80 views

Automatically wrapping lines in Ask Ubuntu

I'm new to forums and stuff like that. I need to post my wifi-info scripts output in Ask Ubuntu using Firefox and I need to keep it as it is without wrapping any lines. As soon as copy and paste it, ...
4
votes
1answer
75 views

How to properly add code in comment

How can I properly add a line of code in a comment like this test test I like it more grey than test test if that is possible. Or if there is another way to define code in a comment to make it ...
16
votes
4answers
367 views

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

Recently in the edit queue, there have been edits that only add <!-- language: bash --> to the post. These edits are made by the same user. And often 5-10 at a time. Is the color highlighting ...
2
votes
0answers
102 views

How can I shorten the Long Code output in questions and answers and display scrollbars?

There are some questions and answers that have very log output that is condensed with scrollbars. Is there a formatting method to control how much is displayed between the scrolling. I believe some ...
0
votes
1answer
142 views

Code Block Limit of 30000 characters

I came across a question where user had copied the output of a certain command and made a *.docx file out of it. The file was uploaded and the link was provided in the question to this file. I copied ...
6
votes
0answers
49 views

Please use code fomatting for code, not quotes [duplicate]

This is some thing I see all the time recently and not just from new users. Users are using > to format there code and that is just wrong. Code should be formatted in one of these three ways ...
2
votes
3answers
87 views

How can I quickly and easily format my code for SE sites' posts?

I usually indent code with tabs, and every time I want to test a snippet before posting it to a SE site I have to reformat it manually before I can post it. Even when I don't use tabs, I need to ...
19
votes
1answer
248 views

How do I format some code specifically for the language used? Or how do I prevent it from being formatted? Which languages are supported?

If I format some code by indenting it using four spaces, the code is not formatted. How do I format some code specifically for the language used? Or how do I prevent it from being formatted? Which ...
4
votes
0answers
69 views

Scrolling code blocks glitch

This is me trying to scroll left and right on this code block (animated): Here are the still images: This is a copy of the problematic code block, which I first found in this question dpkg was ...
7
votes
0answers
51 views

Preserve tabs in code

Tabs are currently rendered as spaces in code blocks. I'm sure this is just a symptom of Markdown or an otherwise well-intentioned method to standardise code samples... However some code needs tabs to ...