Quantcast
Channel: VSCode not indenting tabs correctly if word length < editor.tabSize - Stack Overflow
Viewing all articles
Browse latest Browse all 3

VSCode not indenting tabs correctly if word length < editor.tabSize

$
0
0

I'm switching to VSCode but at this point all my sources are quite messed up and I manage to pinpoint what the problem is.

Basically when a tabulation char follows a word which is shorter than the editor.tabSize value VS will insert the amount of spaces in its settings minus the word length while it should probably insert the this value PLUS the editor value.

An example code rendered in Notepad:

Tabulation in Notepad

Same code rendered by VSCode with editor.tabSize=4:

enter image description here

Every instruction is followed by ONE tab but VSCode requires TWO if tab follows a word shorter than tabSize.

Here tabs following "LEA" instructions end up being only one space long (tabSize minus length of word)

Is there a way to prevent this annoying behaviour? Changing all the occurencies in code would be quite a long work and they would be messed up when opened in other editors, surely not a solution.

Thanks!


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images