I tried turning off the auto-pair brackets function in the editor settings but nothing happened.
I searched for “underscore” in community plugins but found nothing.
I tried variations of the search “obsidian double underscore” on Google and the forums but didn’t find anything relevant.
What I’m trying to do
Whenever I type _ in Obsidian it auto-pairs the underscore with another one. So I get like two underscores with the cursor in the middle like so: _|_
This has become an annoyance as I use the underscore a lot for subscripts in mathematical notation. I would like to turn this “feature” off, but I’m not sure how.
I’ve only encountered this issue in Obsidian, and not any other editors I use.
I use Obsidian v0.12.10 on macOS Catalina v10.15.7
Thank you! This solves the problem, however it creates a new one: I frequently use the auto pairing function for Markdown syntax such as * for italics or ** for bold. Is there a way to only turn off auto pairing of _?
Can you put your mathematical notation in Obsidian Code blocks? You can find out more about it in Format Your Notes. Search for “code blocks”, it’s about half-way down the page.
If I understand correctly, you’re suggesting to put the MathJax code in a code block? I don’t see how that solves my problem, since whether or not you’re in a code block doesn’t appear to affect auto pairing. Moreover, MathJax code written in a code block won’t be rendered in preview mode.
I’ve noticed that auto-pairing does not occur if the underscore is preceded by a letter or number. However, it does occur if it is preceded by }, which is typically the case for me. I’m not sure about the inner workings of the auto pairing function, but if somehow this symbol was treated a number or letter, it would have solved my problem.
If you turn “Auto pair Markdown syntax” off, you can use CMD I for italics and CMD B for bold, with both keystrokes automatically pairing the single / double asterisks used in Markdown.