M
M
Maxim js2019-09-22 18:07:13
GitHub
Maxim js, 2019-09-22 18:07:13

Why are the indents not displayed on github?

In the atom, everything is clear, in the subclime, too, all nesting is as it should be. Sometimes I use parts of the finished code, I check all the offsets, but as soon as you upload to github, a few lines will definitely fall out (
How can I make sure that if I upload to github everything will be clear as in a sublime or atom ???
Maybe there is a plugin?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2019-09-22
@winers

infuriates himself.
The answer is simple: don't use tabs for indentation. or create your own style for github, but it will only work for you.
I solved this by automatically replacing tabs with spaces when committing.

I
Ivan Bogachev, 2019-09-22
@sfi0zy

as soon as you upload to github, a few lines will fall out (

Use only spaces in your code. Or just tabs. Don't mix tabs and spaces. Tabs can be displayed as 2, 3, 4 or even 8 spaces - everyone is different, depending on the settings. As a result, the mixture of tabs and spaces looks "normal" in some cases, but "falls apart" in other cases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question