Turning off the toggle for auto pairing of markdown syntax in Settings > Editor doesn’t work in both the desktop and mobile app, and turning off the toggle to auto pair brackets doesn’t work in the mobile app.
Desktop:
Using command-b and command-i for bold and italic results in asterisks on both sides of the cursor even when the auto pair toggle is turned off
Mobile:
The same issue occurs in the mobile editor when using the bold and italic buttons in the toolbar
The toggle to turn off auto pairing of parentheses and brackets is broken as well
This is particularly troublesome for people who also write in rich text word processors, email clients, etc., where command-i and command-b are used to end as well as begin italic and bold formatting. Auto pairing means that a writer instead has to override muscle memory and hit the right arrow (twice in the case of bold) to escape the formatting.
When the auto pair toggle(s) are turned off, auto pairing should not occur UNLESS text is selected.
Steps to reproduce
Desktop:
turn off the toggle for auto pairing of markdown syntax in Settings > Editor
Mobile:
turn off the toggle for auto pairing of markdown syntax in Settings > Editor
turn off the toggle for auto pairing of brackets and parentheses in Settings > Editor
Expected result
Markdown syntax characters do not auto pair
Brackets and parentheses do not auto pair (mobile only)
Actual result
Markdown syntax characters continue to auto pair even after auto pairing is turned off in the settings
Brackets and parentheses continue to auto pair even after auto pairing is turned off in the settings (mobile only)
Environment
Operating system: macOS 12.2 and earlier; iOS 15.3 and earlier
Maybe there is a big misunderstanding here.
Autopair markdown symbols refers to when you type * you get **.
It has nothing to do with the manual command cmd-b cmd-i.
The workflow is this: 1) select text 2) make it bold with cmd-b
It’s not cmd-b, write-text, cmd-b.
I understand that people coming from document processors (like word) might be used to that way of doing things. Obsidian (and other markdown editors) has a text/code editor bias in this regard.
So what would be the disadvantage of command-b and command-i not auto pairing when auto pairing is turned off and text is not selected?
As I mentioned, not all markdown editors behave the way you say they do. And Obsidian isn’t a code editor like VS Code, it’s a notes/PKM/writing app with a large user base of non-programmers.
It would be good if Obsidian allowed users to choose whether to follow standard word processor UX or follow standard markdown and code editors.
True.
Even a program like Logseq has this Cheshire Cat approach to the Ctrl/cmd styling commands.
This works for me, whether autopair is on or off
And this works
Ctrl-B, write text, R arrow(s)
I’m not entirely sure what Obsidian does with autopair.
My first test, with autopair on, styled the word, but then unstyled it on the second ccommand.
My second test, with autopair off, styled the word, added the appropriate number of asterisks again on the second command. The result was text styled as desired, with a large number of extra asterisks at the end. (I think this is the same as Dynalist).
When I turned autopair on again, the second behaviour remained.
I don’t understand this. But the second behaviour is more desirable than the first.
I think it makes sense that anyone using Ctrl/Cmd keys to turn styling on, would expect the same key to turn the styling off again.