GitHub consistently maintains user-defined tab-width preferences [GA] #167417
Replies: 3 comments 1 reply
-
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.
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