0

In my sublime by defoult I have Tab-size:2, and all code looks good, but when I push it to the repo - my code became unreal for read, it has huge indents.

Is this normal, or I something missed?

enter image description here

Eva Nebko
  • 214
  • 1
  • 2
  • 9
  • 2
    possible duplicate of [How to change tab size on GitHub?](http://stackoverflow.com/questions/8833953/how-to-change-tab-size-on-github) – Chnossos Jun 25 '14 at 18:39
  • 1
    That's because tab size is, by design, user-configurable. Tabs may look like two spaces in your editor, but they may look like 16 spaces in mine. Looking like 8 spaces is a common default, which looks to be what GitHub is using. – ChrisGPT was on strike Jun 25 '14 at 19:45
  • 2
    If you always want your indent to be 2 space everywhere, use space for tabs instead of tabs. You can configure that in Sublime Text. Use this setting: `"translate_tabs_to_spaces": true`. –  Jun 25 '14 at 23:40

1 Answers1

2

You should be able to avoid this using spaces instead of tabs. Set translate_tabs_to_spaces to true. See Indentation Settings for details.

idleberg
  • 12,634
  • 7
  • 43
  • 70