Force tab to space conversion in editor

It would always be nice to be consistent and one of the most annoying things are having mixture of tab and spaces for indentation of bullet-points in markdown.

I would like to propose the idea of having an option in the settings that the user can say if a tab should stay a tab, or it should be transformed into space characters, and then if so, how many spaces. This is a very common option in IDEs and editors.

P.s: I didn't find similar feature request by searching "tab space" in the forum's searchbox or github's issues exept this one which is somehow related:

11 Likes

I would love such a feature as well.
Would you mind creating an issue for it and posting it here?

2 Likes

Hi,

Really need this feature.
I use Joplin to archive my bash scripts and docs.
It's very annoying.

Thanks !

I second the request for this feature.

I'd like to see this, too. One place where it causes a problem is when I'm indenting in a code block. I tab until a comment, e.g., appears aligned in the editor, but then in the rendered view it's over-indented:

I started with pasted code from my IDE, which uses spaces (naturally :upside_down_face:), so I wind up with a mixture of tabs and spaces.

I'm not sure why the editor doesn't match the rendered view in this case, but maybe the following plugin - that changes the default indentation to spaces - may be useful. it can also be used to change how tabs are presented in the editor (their size in spaces), if you wish to keep using tabs but want to align them better with the rendered view. it doesn't replace the spaces/tabs that currently appear in your notes, though.

Plugin: Space Indenter

1 Like

Thanks! I had played around with that plugin a bit, but without success. To be fair, I didn't try very hard. I'll give it another look.