Thursday, August 18, 2016

Change tab size for views in GitHub

To change tab size for views in GitHub, use `ts` parameter as follows:

https://github.com/izeye/ask-anything/blob/master/src/main/java/com/ctb/askanything/Application.java?ts=2

You can change tab size for a repository by adding a `.editorconfig` file as follows:

[*.{java,js,html}]
indent_style = tab
indent_size = 2

Now all `.java`, `.js`, `.html` files use 2 spaces for tab.

References:
https://github.com/tiimgreen/github-cheat-sheet#adjust-tab-space
http://stackoverflow.com/questions/8833953/how-to-change-tab-size-on-github

No comments:

Post a Comment