Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Honestly it continually surprises me how people forget about TSV

It's the perfect format, more or less! CSV, but no difficulty around commas, and the only major risk being an editor that converts tabs to spaces





I agree it's great, but that risk is so major that I stopped using it. "There's a 50% chance that your editor will invisibly corrupt the data you enter, and another 30% chance to corrupt the entire file" is just not usable...

Especially in Zed where the only way to switch hard tabs is buried in the settings menu, and impossible to change per buffer.


Lack of control over your editor's behaviour shouldn't be acceptable on this level. Just like making tabs/spaces visible, control like this ahould be a basic feature of every editor.

You'd think more editors would be smart enough to recognize that it's a TSV file and therefore should preserve the tabs, in much the same way that you'd think editors would be smart enough to recognize that something's a Makefile and therefore should preserve the tabs.

It gets tricky when you have a TSV inside Markdown. I don’t think I’ve ever seen tabs used for indentation in Markdown in the wild, though it probably does work.

We could, however, make the Tab key insert spaces if the cursor is in the beginning of a line, and a literal \t if it’s in the middle. This way, you can write a TSV table pretty much anywhere you want.


> Especially in Zed where the only way to switch hard tabs is buried in the settings menu, and impossible to change per buffer.

Even vim lets you set that per-buffer so that's more of an editor problem than anything else, lmao




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: