userstyles.org - GitHub: better-sized tabs in code

Change the width of tab characters in code from the default 8 spaces wide to 4 spaces wide. For Ruby code, tabs are 2 spaces wide. (Number of spaces is customizable using the selectors.) This style applies to code anywhere on GitHub – in repositories and in Gists.

For example, code might go from
really
        long
                indents
to
more
    reasonable
        indents
This only affects code indented with tab characters (\t). Code indented with multiple spaces will look the same.

Customize your desired size of tabs below.

To use this style, install Firefox and Stylish. If you already have Stylish, make sure this site is allowed to run JavaScript.

(Though installing Stylish is recommended, if your browser supports user scripts, you can also install this style as a user script.)

GitHub: better-sized tabs in code
139840
70979
github
Author Rory O’Kane
License CC BY-SA
Created Aug 10, 2012
Updated Mar 18, 2015
Installs (this week) 9
Installs (total) 2,700
Show CSS

Notes

See also my user style “All code has custom tab size”, which affects all websites.

Feedback

Discussions

No discussions posted in the last year. See older discussions. Ask a new question or add a review for this style.