Option to disable tab to indent

Awesome, thanks!

Thanks!

I tried it but can’t make it work. I installed the plugin using BRAT. When enabled nothing happens when I press tab key. I have Swedish keyboard, could that be the problem?

The plugin is now on the Obsidian community plugin repo.
Try download the latest version by browsing it in Obsidian.

The tab key detection is just a native Obsidian hotkey, not sure if Obsidian is detecting that properly.
I’ve made changes to it since you tried it, I think it should work now.

3 Likes

It works! Thank you for making Obsidian 100% more useful.

3 Likes

This isn’t a very popular feature request

I suspect plenty of folks find this ā€œfeatureā€ to be an annoyance, search for a non-existing solution, and move on. If it were put to a poll to all users, most would likely prefer ā€œstandardā€ behavior, and that this input-hijacking would be optional.

2 Likes

You don’t have to convince me. I voted for this FR too. I was just explaining to that other poster why they can’t expect fast action on every FR.

1 Like

I noticed you’re behind it, i was just putting the idea out there that what we see in here is likely not representative of the userbase as a whole. Silent majority kinda thing.

1 Like

markdown tabs are used for indenting and are eliminated in the rendered form in all other cases

Some analogies:

Compiling source code strips out comments, yet they are useful. The fact that wrapping and indenting call chains has no effect on the compiled output does not matter, it is still useful when i am writing code. Handwritten HTML is absolutely loaded with whitespace bound to be stripped when rendered. (And no, not just for start-of-line hierarchical indentation. Consider attributes/attribute values.)

Similarly, it can be useful to use whitespace to improve the editing experience of raw markdown, knowing full well it would be stripped. Just as with source code, text documents are dynamic (for want of a better word) - what works best can only be determined by the content. And the author, of course.


If this were put to a poll to all users, my instinct tells me there is a significant silent majority that would prefer this ā€œtab key only ever means start-of-line indent and can never be used to insert a tab character or multiple spaces at cursor location depending on your settings, even if you’re in source mode and/or a code blockā€ to be optional behavior. All while knowing that this whitespace will be stripped when rendered, assuming it’s destined to be rendered at all.


That said, I do appreciate Obsidian and the work put into it. :coin::coin::vulcan_salute:

1 Like

Thank you! That’s exactly what I wanted (after modifying the default settings to enable ā€œUse spaces instead of tabā€ and ā€œAlign spacesā€ and disable ā€œUse hard spacesā€).

I hope Obsidian incorporates these features into the base someday.

Thank you so much for sharing this!

The number of downloads are a good indication that this is a popular request :wink:
image

3 Likes

Tabs are perfectly fine in Markdown, exactly like spaces.

The TAB key does not always insert a tab character, it depends on the editor.

The developers here decided to give the TAB key a specific behavior.

Users want to be able to customize that behavior, just as they can customize dozens of other behaviors and hotkeys.

It’s that simple.

This is a valid feature request, it should just be a matter of priority, not whether to include it or not.

There’s no Markdown dogma or standard to uphold, just a normal feature to implement and an option in the preferences to enable.

The default, as usual, will be what the developers think is best for users. Users are free to choose otherwise.

This has nothing to do with whether or not tabs are supported in Markdown, it’s just a UX/UI request.

Personally, I’d like to have the option to use the TAB key as I would in a regular text editor, i.e. to insert the tab character.

Having the additional option to do it only in code blocks would be a nicer touch.

Kudos to @jerrymk, but forcing me (like many others) to download a community plugin to have this option is ridiculous.

If this has any value in the discussion, I’m also a paying user because I think the software is great, so please don’t give me reasons to look for other software.

2 Likes

I completely agree with Giuseppe. I feel there is an issue with Tab still being limited to specific functions and not being usable as an arbitrary hotkey.

Use case or problem

I would like to organize some Text more easy on the page. Like in a coding environment. With the certainty that every level on the page is aligned.

Proposed solution

give the possibility to change the way how the tabulator button works.

Current workaround (optional)

insert that much single-space like I need to solve the problem

pictures

bad:

good:

For the case that there is a other threat which seeking for the same like me, please move it for me. I searched for related topics, but didn’t found something.

:heart:

Is this really still not an option? I have to go learn how to install community plugins to access a ā€œfeatureā€ as simple as the Tab key inserting a tab character? That’s immensely frustrating.
What’s completely crazy is that my current workaround is to copy & paste tab characters into my documents, which is inconvenient but fully functional, so the tab character obviously exists and works exactly how I expect.

There is an ā€œIndent using tabsā€ option, which seemingly doesn’t change the functionality of the Tab key at all, and just adds the ability to start a line with four spaces to create an indent.
Version v1.8.10

I tested Indent using tabs setting on v1.8.10:

Indent using tabs = ON:
When pressing tab then character U+0009 is produced (tab character)

Indent using tabs = OFF:
When pressing tab then four spaces U+0020 are produced

On both cases indentation happens using the tab key but the setting dictates whether the indentation uses the tab character or four spaces.