Code auto formatting in code blocks

I have no idea if it is possible, but it would be great if there was an option to auto format the syntax in the code blocks. Something similar to what prettier does in Visual Code Studio.

Use case or problem

In many of my notes I’m just copy and pasting code already formatted by prettier but that format is lost in Obsidian.

Proposed solution

Integrate obsidian with prettier?

2 Likes
1 Like

This is something that I was looking for as well. My workaround is to open the md file in question with my code editor (Vim, in my case) and just paste it into the code block there.

Alternatively, you may also try this: GitHub - rposborne/prettier-markdown-codeblocks: Autoformat markdown code blocks.

1 Like

A post was merged into an existing topic: AI Powered Snippet Curation

Shift + Command (Ctrl) + V instead of Command (Ctrl) + V will help.

1 Like