-
Notifications
You must be signed in to change notification settings - Fork 129
pre { tab-size: 4 } #170
Comments
👍 I find it annoying too. I reached out to GitHub about this when they decided to drop tab characters entirely (now restored). The hack they shared was to add |
@nschonni Thanks, didn't know that. Weird that they'd implement that but not have a sensible default! Also, it doesn't work on gist.github.com sadly |
Not to hijack the request, but it would be nice to be able to set your preference in your user profile or by project |
+1 |
From GitHub:
|
👍 |
1 similar comment
👍 |
I suggested this in early april and got this response from GitHub:
|
We actually do use I just proposed to the team that we persist the |
@bkeepers That sounds to me like a winning solution - grants all the customisability without having to crowbar in extra complexity to the account settings page. Fingers crossed your colleagues go for it. Thanks! |
Even if it's a good change that most will want? As an example, Facebook has changed their design a lot, people got angry, but in the end everyone got used to it, and most even found it better. Just saying. |
I'm all for changing it then, but we don't really have an easy way to quantify that besides gut feeling. We could take time to research it, but honestly I would rather just make |
The way to quantify would be the feedback you received last time you completely replaced tabs with spaces in the diffs and the feedback that got 😉 |
big +1 to changing this it looks ridiculous right now |
+1! |
Yes. Please. |
👍 |
I made a quick Chrome extension that fixes this: https://github.com/sindresorhus/github-tab-size Still hoping for GitHub to fix it themselves though.
|
+1 |
thou shalt not have nice tabs |
What about reading modelines? |
supporting |
Please change this or give us a good option to do it ourselves. Quantify? What about checking default tab size on decent editors like Notepad++, Sublime. After that check the default tab size on MS 👯 |
+1 .editorconfig |
+1 |
👍 for ?ts=4 only one time |
+1 |
Hi there, I've just published a browser extension that provides EditorConfig support for GitHub's code viewer and editor: |
@ioquatix What about mobile users, or those whose browsers don't support such a thing? |
Oh, I totally agree, and I advocate for:
|
@ioquatix Ironically, I found this post by reading some of your code and wishing I could make the tabs be 2 spaces. 😅 |
It's time for my annual "nag GitHub support to add this feature again". This time I was more clear about receiving an explanation. CC'd here for transparency:
|
One way to get GitHub to move on this might be to implement a similar feature in GitLab... https://gitlab.com/gitlab-org/gitlab/issues/26768 I'm going to take a stab at it if I have time. |
Yes, guys, comment and upvote there! |
This adds an editorconfig file. It's main purpose is to tell github how wide a tab character is. This is supported according to [1]. [1]: isaacs/github#170 (comment)
This also applies to Markdown previews. Bitbucket handles tabs correctly, by the way. |
Any news on this feature? |
Since Github offers things like setting emoji color and theme in here: https://github.com/settings/appearance this should be the right place to also set preferred tab size. |
Since I just found this, and I don't know if it's been posted already, and I think it makes relevant arguments, I'll link this Reddit post. TL;DR: +1 for adding an optional user-level tab-width config. Bonus points to actively recommend that new repos use tabs. |
I just want to express my desire for a repo level tab setting that does not require pushing contributors to use that same setting in their own editors. I go to great effort to make sure my code looks right in any tab setting (tabs for indentation, spaces for alignment), but I want the Github presentation to be 4 character widths for tabs. Tabs more than 4 characters wide rapidly push code so far to the right that it can become a serious problem for readability. |
just created my first gist. Yay! |
I didn't realize there wasn't anything open at github/feedback, so I opened community/community#4893 and linked back here. Upvote (not just 👍) there to get GitHub's attention on this. |
Hey everyone 👋 good news, you can now define the tab size in the Appearance settings of your user account. Code rendered on GitHub with tab indent will use your preferred tab size. |
- Sets the default tab width to 4 (instead of 8) when viewing JS files via GitHub - Source: isaacs/github#170 (comment)
For some unfathomable reason, browsers render tabs as 8 spaces. Even among the minority of developers who agree that tabs > spaces, I've yet to find anyone who thinks that makes sense.
Happily, most browsers allow you to set the tab width with the CSS
tab-size
property. Adding something like the following to the CSS used on github.com and gist.github.com would make code previews much more readable:The text was updated successfully, but these errors were encountered: