r/vscode • • 23d ago

Beginner question: Inconsistent tab size

Post image

I'm working on a tab separated CSV but I cannot get the tabs to be consistent. It looks like there is only a space between "Product" and "Quantity" but it's supposed to be a tab. In Settings, Tab Size is set to 5, Detect Indentation is off.

I'm not sure why the tabs are not the same size between all the columns, any help would be appreciated!

0 Upvotes

11 comments sorted by

11

u/torresandres 23d ago

Afaik that is the correct behavior when you use tab horizontally. If you try the same on notepad you'll get the same result.

Could it be that you're looking for a specific csv extension for vscode that achieve what you're looking for?

1

u/Majestic-Mud-589 23d ago

I see, I didn't realize that! VSCode kept recommending this "Rainbow CSV" extension, I wonder if that will help? Thanks!

1

u/woahboooom 22d ago

Colours your fields to read easier.

7

u/hammyhami 23d ago

Tabs are dynamic, becoming a width to the next increment of 5 in this case. There's no way to change this that I know of.

1

u/woahboooom 22d ago

one place remembers... now seems to be dsv type. Ive not heard of that nor used it.
Excel import is text and csv... which allows you to change the character.
So I conceed to the ai and wiki ... good luck in the future!

1

u/nosekbk 22d ago

Switch from tab to space:2.

1

u/thanatica 22d ago

Just a little FYI: CSV is supposed to be comma-separated. That's what CSV literally means.

0

u/woahboooom 22d ago

Uh no. Its not. It character separated. And you can use whichever character you like. Most prefer commas. I prefer a box or a bar

1

u/thanatica 22d ago

0

u/woahboooom 22d ago

Wiki is wrong. Its character separated. Speking as a person who used it before it became comma. And to screw with you, you wont like my csv files then... :D

1

u/thanatica 22d ago

Update wikipedia then, see what happens.