Disable all forms of markdown typing assistance in codeblocks

Use case or problem

Currently, most of the typing assistance that Obsidian provides do no make sense or actively gets in the way when writing within a codeblock. For example, auto-pairing of markdown symbols (like bold), link suggestion [[, tag suggestion #. Also unlinked mention should not be picked up (here).

Proposed solution

All these typing assistance tools should be deactivated while typing within a codeblock.

Notes

This FR is a simplified version of this other FR that asks for type-dependent behavior.

Agree with this completely!

Steps to reproduce

  • Create a new codeblock
  • Write [[ in it and see link suggestions.

In lua multi-line comment syntax is

--[[ Multi-line
comment --]]

Typing that triggers link suggestions.

I would also appreciate this. Bash code blocks keeps trying to change my text in double square brackets such as ‘if [[ $var = “some text” ]]; …. Etc. it’s quite annoying.

Not sure if “me too” posts are welcome here or not, but I would also like to see this happen - either “always”, or have a preference which disables all forms of typing “assistance” within code blocks.

Totally support the addition of this feature. writing bash scripts in codeblocks is just painful with the current typing assistance.

I am simply baffled that this has not gotten more attention. Most likely because people with hit separate problems and will not connect them to this feature request. I was actually considering making a bug report as obsidian’s code block is clearly not a code block. Discord, Bear you name it has a code block but obsidian does not as long as markdown typing assistance is messing with it.

Just to show how frustrating this is here is an example how obsidian behaves:

30. 6. Korrelaatio= 0.188  p-arvo= 0.0122
 1. 7. Korrelaatio= 0.302  p-arvo= 0.0001
 2. 7. Korrelaatio= 0.338  p-arvo= 0.0000
 3. 7. Korrelaatio= 0.381  p-arvo= 0.0000
 4. 7. Korrelaatio= 0.483  p-arvo= 0.0000
 5. 7. Korrelaatio= 0.667  p-arvo= 0.0000
 6. 7. Korrelaatio= 0.823  p-arvo= 0.0000
 7. 7. Korrelaatio= 1.000  p-arvo= 0.0000
 8. 7. Korrelaatio= 0.822  p-arvo= 0.0000
 9. 7. Korrelaatio= 0.677  p-arvo= 0.0000
10. 7. Korrelaatio= 0.565  p-arvo= 0.0000
11. 7. Korrelaatio= 0.527  p-arvo= 0.0000
12. 7. Korrelaatio= 0.520  p-arvo= 0.0000
13. 7. Korrelaatio= 0.448  p-arvo= 0.0000
14. 7. Korrelaatio= 0.374  p-arvo= 0.0000

Becomes this in obsidian:

30. 6. Korrelaatio= 0.188  p-arvo= 0.0122
 31. 7. Korrelaatio= 0.302  p-arvo= 0.0001
 32. 7. Korrelaatio= 0.338  p-arvo= 0.0000
 33. 7. Korrelaatio= 0.381  p-arvo= 0.0000
 34. 7. Korrelaatio= 0.483  p-arvo= 0.0000
 35. 7. Korrelaatio= 0.667  p-arvo= 0.0000
 36. 7. Korrelaatio= 0.823  p-arvo= 0.0000
 37. 7. Korrelaatio= 1.000  p-arvo= 0.0000
 38. 7. Korrelaatio= 0.822  p-arvo= 0.0000
 39. 7. Korrelaatio= 0.677  p-arvo= 0.0000
40. 7. Korrelaatio= 0.565  p-arvo= 0.0000
41. 7. Korrelaatio= 0.527  p-arvo= 0.0000
42. 7. Korrelaatio= 0.520  p-arvo= 0.0000
43. 7. Korrelaatio= 0.448  p-arvo= 0.0000
44. 7. Korrelaatio= 0.374  p-arvo= 0.0000

Oh my god, I’m super pissed off. This issue basically makes Obsidian unreliable. It distorts the inserted content to its own liking and does so in an egregious way.

I make a sublist:

1. List item
2. List item
   1. Sublist item
   2. Sublist item

Obsidian turns 1 and 2 in the sublist into 3 and 4 distorting my intention.

And even if I write it in code, the conversion still happens. Even if it’s a JavaScript code!!! This is beyond all things imaginable.

And it’s not even in the reading mode, it gets its way into the source and gets saved into the file in this way! Why this distinction between two modes then?

Use case or problem

In code blocks, I often need to type a # and hit enter. I do that to produce a # and then a newline. Instead, I get a # and some random word of Obsidian’s choosing. This frequently trips me up.

Proposed solution

There could be a setting: “disable tag autocomplete”. This is the common solution in other text editors that autocomplete, because popping anything up while one types is disruptive — there must be an option to opt out, or distraction-free writing is impossible.

Current workaround (optional)

I could probably use a custom CSS snippet to forcibly hide the popup. There is no workaround for non-technical users.