GitHub consistently maintains user-defined tab-width preferences [GA] #167417
Replies: 6 comments 3 replies
-
I see the code viewer on Gist honours the tab size preference as well, nice 😊! I've detailed a few things I think could be improved, below.
|
Beta Was this translation helpful? Give feedback.
-
I've been asking for this for years. Great to see it's finally implemented. Thanks! |
Beta Was this translation helpful? Give feedback.
-
When I make "Suggested Changes" and then submit a review, the post-review "Suggested Changes" box does not appear to respect my tab width. |
Beta Was this translation helpful? Give feedback.
-
I'm so happy to hear this. 🙏 |
Beta Was this translation helpful? Give feedback.
-
i'm very happy about this feature — however, i discovered a github bug here: github is mangling codeblocks that are nested under list items, by inserting a leading space on every line. this breaks the code snippets. i reproduced the issue here on this gist, which has more explanation: https://gist.github.com/chase-moskal/0714c9b5e974f99162774d24524a099a if anybody could repost this in the appropriate bug reporting place, or forward it to the relevant developers, i would appreciate it. thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion Type
Product Feedback
Discussion Content
Historically, users on GitHub have been able to set their preferred tab width for viewing code, but this preference was not reliably respected throughout the site. Inconsistent tab rendering, especially in Markdown-rendered content (i.e., READMEs and discussions) led to code that looked different from what users expected. This made it harder to read and review. This also meant that project-defined tab widths weren’t always applied, further impacting the overall developer experience.
GitHub now applies user-defined tab width preferences consistently across the entire site. A global CSS update ensures that anywhere code is displayed, whether it’s in preformatted text, code blocks, or other Markdown-rendered contexts, the tab size will match the user’s setting from their account preferences. It’s important to note that this improvement only affects code that uses tab characters; code indented with spaces will continue to appear as before. The main impact will be seen in places like READMEs and discussions where Markdown content includes code blocks. This enables a more uniform and personalized code-viewing experience across GitHub.
Beta Was this translation helpful? Give feedback.
All reactions