Very annoying that there is no option to switch between tab character and indent. Specifically for plugins and using tab for shortcuts, it isn’t possible to use tab for shortcuts or plugins whilst this is commonly used in other programs for expansions. Would very much appreciate the choice of the two functionalities.
Bump - this is driving me crazy.
I used Obsidian for my daily work log and have to scan barcodes.
Most barcode scanners are set to send either a tab, carriage return or line-feed character after a scan. In my case, all scanners are set to send tabs, which indents my notes.
For a compromise, I suggest not auto-indenting if the user has started code formatting with a backtick ` and submits a TAB keypress.
Kind Regards,
Ben
Woah, so weird: used obsidian for months, then decided to subscribe for sync…
and then this update comes out which makes me regret getting used to obsidian.
What are you referring to? You’re replying to a +year-old feature request.
There is a on/off feature under Options > Editor that allows us to change tab characters to space characters instead. And yet tabbing in the middle of the line does not insert those space characters - it tabs the line forward instead.
I am politely curious as to the logic of this, as my google fu has not uncovered any logic behind why this is a thing in Markdown.
For example, I would tab things so I could move the attributing author beneath a quote. In Obsidian to do this I instead need to use right-align, which for ease of use requires two plugins (Templater and cMenu).
Or like others here, I would tab within a sentence if I wanted to have something like a comment visually pleasantly in line with others. Instead I can use the Advanced Tables plugin to create a table, or copy-paste the tab character or spaces within a line.
I realize Obsidian may not be a word processor, or Scrivener, but dangnabit that’s exactly how I’m using it - a wonderful way of linking all my ideas for world building together, being able to actually see where I’ve written about the same thing a dozen times over and consolidate my notes, while writing out drafts using the Longform plugin.
In the end I’ll survive the move to Obsidian without being easily able to right-align or tab within a sentence, but it’ll require I change my habits - and the procrastinator in me apparently demonstrates that it’s easier to spend an hour looking for an answer instead of putting the effort into changing habits XD
That answers your question about the logic of it. It’s a Markdown-based editor, and Markdown doesn’t support formatting indentation like that. It strips internal whitespace.
Don’t get me wrong, I’d probably use it too. I use actual tab-stops in Scrivener all the time to align things in pseudo-tables, and miss that.
But in Obsidian, this tab/space setting only applies to indenting lines. If you need to insert a tab character inline, you’ll need to insert it using some kind of snippet tool, and then be ready to handle any glitches in your formatting.
As @rigmarole mentioned, Extra Spaces and Tab Characters are removed in the processed markdown.
Ahh, yes, I haven’t been using the preview mode at all, I’ve just been in editing mode. I see that the tabs disappear now.
Thank you for being kind enough to patiently repeat an explanation that I had missed. I did the childish thing and went another layer of “But why?” in my head - and the answer to that from google is that collapsing whitespace is a “feature” of HTML, and Markdown is a subset of HTML. I can still make it happen by using the <pre> </pre> tags with spacing between them, as long as I copy paste the tab. But many websites don’t use monospace fonts except in codeblocks, so letter widths would vary and the effect would still be misaligned.
Ultimately it’s probably better for me that I can’t use tabs like this, really - I don’t think I’ve ever come back to reference writing that I’ve made pretty with pseudo tables, and Advanced Tables can create what I should have been using more than well enough.
And at this point in my work my focus should be on generating and connecting ideas, anyway!
Nice to have it all so HTML friendly by default though.
It’s completely ridiculous that the answer here is “markdown doesn’t do tabs!”
It most certainly does. They’re whitespace, and markdown processors aren’t supposed to screw with them. That’s because Markdown is meant to be read in plain text as much as rich text.
This is an utterly lame deficiency in any kind of note editor, and I’ve just cancelled my commercial license renewal over it and this dumb reply. The ivory tower syndrome with prescriptive workflow in this editor has gotten out of hand.
At the end of the day, Obsidian is a text editor. It does other stuff too, but it needs to be an excellent plaintext editor. Of course you need to allow tabs to be inserted. JFC.
Tabs are generally not whitespaces. (There’s toggle to make tab output whitespaces though)
Markdown processor are supposed to “screw” both tabs and whitespaces.
Having Tab
act counter-intuitively does still throw me off once a while and I’ve been using Obsidian for a year.
The problem right now is that Obsidian does look like a text editor so you’d expect Tab
to work similar to a text editor. It’s not an outliner, where it would make sense for Tab
to indent from anywhere in the line. So this is a violation of user expectation.
And there is value in having alignment in source view even if it’s ignored when the markdown is rendered. An example: this is why I use Advanced Tables. Because it aligns the table columns in source view automatically for me by adding spaces. This has no effect on Reading View but it is absolutely necessary for not only easier reading in Source View but for easier editing as you can arrow up and down within a column! Same rationale with Tab
s in source view: makes both reading and up-and-down navigation easier. Yes, Markdown was designed to be easy to read and write in source view (that’s the whole point; otherwise, we’d be using raw HTML).
And in any case, we already have other indent/unindent keys. On macOS, it’s convention to have ⌘]
and ⌘[
for that purpose (and ⌃D
and ⌃T
in vim insert mode). In fact, for me, these already work in Obsidian and that’s what I use. I don’t use Tab
s for that (as it’s overloaded all over the place in multiple contexts and by multiple apps and is thus quite unpredictable)
So perhaps that’s what needs to be done: Tab
(and its sibling Shift+Tab
) should indent from anywhere in the line as long as the line is a list item. Otherwise, it should indent only when the cursor is before the first non-whitespace character of the line.
Otherwise, people can use the standard ⌘]
and ⌘[
(or their equivalents in other OS’s).
i completely agree with this “feature” being a weird trait
basically your whole community is devs or has knowledge of atleast basic/intermediate coding
- your whole “community plugins” section is a straight proof of this
so if you don’t expect that your community expects to be able to indent in a regular fashion, u got it completely upside down, and kinda gotta evaluate which group you’re trying to hit … this weird indentation is for granma’s if anything - and no grandma is gonna take their time to set up Obsidian with such a stale learning curve.
For heavens sake … it’s not even possible to indent to a comment in a codeblock …
dude
I’d like to chime in that this tab behavior is a bad feature:
I’m trying to write content within backticks (```) and I’m not writing markdown in that case, so why can’t I have an actual tab? Like I can with every other editor on the planet?
I agree that this hybrid or semi rendered or whatever it’s called editor approach is silly.
Edit markdown as raw text and render it separately. Done.
That’s what markdown is.
You can absolutely have a tab character. Just as of right now, you’ll have to find an alternative way to insert it. A snippet manager, copy/paste, etc.
I get that it’s inconvenient, and you wish it wasn’t this way. I hope the option gets added too. But it certainly isn’t impossible.
This isn’t a very popular feature request, so it’s probably best if you embrace a workaround for the moment. (I’m not a dev, I’m not speaking for the devs, and I have no insight into whether this will be changed or not.)
I’ll make one final post to this forum, but I indeed immediately discontinued use of Obsidian two months ago and cancelled any renewals.
Search the page for “one tab”.
Tabs are part of Markdown. They even have significance at the beginning of a line. They don’t render to more than one space in HTML, true, unless used for indents. And that’s completely irrelevant.
Guess how many users never ever use the HTML publishing capabilities of Markdown and only look at plaintext? If you don’t know a clear answer to this question, you have no business dying on this hill. Your answer is non-intuitive enough it’s not going to fly without market research to suggest nobody needs that tab key.
Say what you want, but for a Markdown editor who supposedly has the competency of being cross-functional with other Markdown-using applications, skipping the ability to enter one of the most common plaintext formatting characters used is BIZARRE.
And by “not screwing with tabs” I obviously meant in the source plaintext, since that is 50%+ of Markdown’s presentation. Markdown was explicitly meant to be formatted readably both ways. Please don’t be so disingenuous.
By your rationale, I shouldn’t be able to hit my space bar multiple times either, and there’s no reason to support “-” and “+” as list characters because they all come out as the same bullet, etc. I think that’s evidence enough your rationale is invalid, and you’re just defending your feature list with nonsense. I’m not going to entertain such an argument further than that.
But my concern goes beyond this feature. It’s this forum. You guys are downright user hostile sometimes in how you argue down common-sense requests. You don’t even have the courtesy to say “good idea” and then deprioritize it in a bug system.
It makes quite an impression about your willingness to listen, and what we can expect for the future–keeping in mind I already had a ton of Tab formatted notes I can’t maintain anymore. You broke those by not considering backwards compatibility.
Well, a note system is a huge investment, and I don’t trust your judgment after threads like this. If you find that to be too personal, I apologize–it’s not. It’s meant for your entire company, because they’re tolerating this. This forum is a huge negative advertisement for your product.
So take the feedback for what it is: you are a markdown editor, and at the end of the day you’re expected to have parity with other markdown editors, and then you get to go YOLO with your own ideas. Only on mobile is it even remotely acceptable to not allow entry of Tab characters, and even there people use formatting ribbons. This decision makes you look janky, and bad. Arguing with your paying users makes you look worse.
You’re welcome to disagree with me, but I’m the loud $50 you don’t get anymore because of stuff like this. That rarely comes without a bunch of quiet people leaving too.
I don’t think I was confrontational.
I just explained why Obsidian binds tab to indent.
Again, as the link you posted pointed out and my commonmark parsing example, in markdown tabs are used for indenting and are eliminated in the rendered form in all other cases. Given this circumstances, it seemed better to bind tab (and shift tab) to make indentation operations faster.
This FR is for tracking users who want a different option and that’s fine and it hasn’t been archived.
You are entitled to your decisions and so are we. No hard feelings, happy holidays!
I think it’s time to make the fix.
I bet you won’t find many users who think that the current behavior is preferable. How many text editors in the world do this? I can’t think of another one.
Just quickly made a plugin to fix the problem.
It is not in the community plugin catalog yet. Already submitted. You can download it on my GitHub repo page.
If the selection is empty (just a cursor, no text selected), a tab will be inserted.
If text is selected, you can decide to replace selection with a tab or indent the selected lines (like in just about every IDE, tab indents, shift tab unindents) in the plugin settings page.