Tabs vs spaces?

This is more of question towards general markdown syntax.

Plugins like restore-tab-key or Linter offer options to choose between tabs and spaces for intendation or to convert between the two (typically tab to 4 spaces and vice versa).

Also some markdown styleguides forbid to use tab characters similar to the PEP8 python styleguide.

Is there any reason to choose one option over the other? Or can I choose freely here according to personal preference?

I prefer to use whitespaces rather than tabs because I’m used to it from python, but I don’t really understand the reasoning behind it.

Well no, the restore-tab-key plugin allows you to insert tabs (or spaces) anywhere in the line. By default the tab key indents the entire line, even if your caret is in the middle of a line.

Even without those plugins, you have always been able to choose tabs or spaces. You are free to choose whichever you wish. If you’re used to using 4 spaces for Python, you might as well stick with that, and call it a day.

If you choose spaces, in Obsidian you can set how many spaces, but I think Markdown does have some rules about number of spaces for indentation. So for maximum compatibility with any other Markdown tools, it’s probably best to stick to 2 or 4, as far as I know. (I might be wrong!)

It’s not really possible to explain any reasoning for either choice without starting (sometimes intense) arguments, because people see it from completely different perspectives. Both sides have perfectly correct reasons, but they will occur as right or wrong depending on your perspective. That’s why it’s an infamous, unending war on the internet. (And if any argument starts here, this thread will be closed. :wink: )

I’ve chosen a True Neutral position. I use the opposite of my preference. I won’t disclose what those preferences are, because it’s irrelevant. Just choose and move on. :joy:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.