Steps to reproduce
- Toggle on ‘Auto pair Markdown syntax’ in Editor settings
- Select a word in editor and type
*. (word becomes italicized)
- Toggle off ‘Auto pair Markdown syntax’ in Editor settings
- Select another word in editor and type
*. (word is overwritten)
My selected text becomes italicized (or bold, highlighted, etc.).
My selected text is overwritten.
This pertains to two related, but separate, features of the editor: 1) auto-pairing markdown syntax when user starts typing markdown, 2) applying markdown to user-selected text.
I want to use #2 but disable #1. But one toggle setting controls the two distinct features.
One solution would be to de-couple these into 2 different settings. Another would be just let #2 be the default, with no setting. I can’t think of a reason someone would want to disable #2 at the moment.
Note: an identical bug exists for the ‘Auto pair brackets’ setting and typing
[ to apply linking to a text selection. But I’ll just submit this one report for both bugs.
Another solution would be to give the toggle a more inclusive name.
That would be a solution if the bug report were about a poorly named setting.
I’m claiming it’s a bug that this setting conflates two separate editor features and disables desirable functionality.
anyway, this sound more like a feature request than a bug report. we’ll think about it.
I considered making a Feature Request but landed on bug report because
- It’s about an already implemented feature.
- It’s unexpectedly disabled by a toggle setting for a separate feature.
- I couldn’t think of a reason a user would desire the feature to ever be disabled.
Just to provide some context - the reasoning that it’s done this way is because the editor we use (CodeMirror) exposes this functionality as a single configuration, and long ago we didn’t even have the choice of only pairing when selecting; it must be either autopair both while typing and while selecting.
I made some tweaks to CodeMirror’s internals to achieve the pairing effect only on selection for
= but we didn’t think of splitting the functionality because of that.
Kudos @Licat to take the time to clearly explain decisions like this.
The Obsidian community rocks!