Markdown formatting: Underscores instead of asterisks with cmd/ctrl+b/i

Is it possible to have the Markdown formatting shortcuts (Bold & Italic) use underscores (_) instead of asterisks (*)?

Example: when I press Cmd+B, I’d like bold to look like this: __a bold phrase__, instead of this: **a bold phrase**.

Edit: revised the previous sentence to make my request clearer.


I am using Obs on a Mac, and underscores work, both for italics and bold.

When I press Cmd+B Obsidian enters **|** – with my cursor placed at |.

@Klaas How did you change that so that when you press Cmd+B you get __|__ instead?

@alehandrof: in your OP you did not mention you want to bind it to Cmd+B.

Anyway, I don’t have that hey binding, but when I type the underscores it does what you want. Cmd+B on my computer inserts asterisks too.

Sorry not to be able to help you further.

1 Like

I stated my request in the second sentence, though my syntax leaves the critical part at the end. I’ll revise it so that “when I press Cmd+B” opens the sentence instead of closing it.

Thanks for taking the time to share your experience! :slight_smile:

The underlying weirdness is markdown supporting both __ and ** for the same instruction.

Which then puts editors in the position of having to support both for rendering and because of the need to conserve key bindings they will choose only one.

Maybe users could be offered a choice, but the downside of that is locking both keybindings to this one instruction or having a potential conflict if anyone maps the unused one to something else.


@alehandrof: you are right and I apologize for this oversight.

1 Like

I always thought of this as a feature, not a bug, though I understand that it can become frustrating for editors. (I wrote a Markdown syntax for Sublime Text some years ago, and had lots of fun with nested formatting :smiley:)

Yes, I’d like to be able to select whether Cmd+B/I use underscores or asterisks.

I moved this topic to #feature-requests, as I gather that that’s what it is :slight_smile:

1 Like

I just opened a feature request today asking for the same thing. Somehow I did not see this thread.

+1 from me too.

My existing notes have _italics_ and **bold** formatting. It would be great to customise Cmd-I to apply underscores.

As a workaround there’s a community plugin for this request