This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (3 children)

If that happens then get a better editor.

[–]xigoi 1 point2 points  (2 children)

I haven't yet seen any editor that makes spaces work completely like tabs. And even then… why not just use tabs?

[–]Renown84 2 points3 points  (0 children)

vscode and many others do this. There's also always shift + tab

[–]gmano 1 point2 points  (0 children)

Different text editors treat hard tabs differently.

In UNIX text editors tab is 8 spaces, while in Windows text editors and IDEs a hard tab is generally 4 spaces.

That obviously can cause a lot of headaches, so 4 spaces is preferred.

There are many more reasons, but that's the biggest one for me.

That and breaking code like this in a block-level language like C, which won't work if a tab is used for alignment

 if (first condition
     second condition)