Skip to content

Instantly share code, notes, and snippets.

@bradleybossard
Created January 29, 2016 22:48
Show Gist options
  • Save bradleybossard/14b786c18ee912e01ca9 to your computer and use it in GitHub Desktop.
Save bradleybossard/14b786c18ee912e01ca9 to your computer and use it in GitHub Desktop.
Fix issue with Github default 1 tab = 8 spaces
/***
By default, Github uses 8 spaces for each tab, which makes code and diffs harder to read b/c long code wraps faster.
Install the Stylish Chrome Extension which injects custom CSS into a page based on url
https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe
then navigate to Github and add the following CSS style to convert 8 spaces to 2
.blob-code {
-moz-tab-size: 2 !important;
-webkit-tab-size: 2 !important;
-o-tab-size: 2 !important;
tab-size: 2 !important;
}
@mathieujobin
Copy link

very cool !

usually I add ?ts=2 to the URL
but that is even better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment