Embed code file

I am learning programming and using obsidian to organize my codes. Now I can only write code in markdown’s code block. Although I can write them in other editors like vscode and then copy them to obsidan, it would be inconvenient to modify and organize those codes.

I think it would be great to embe a code file (such as .cpp, .py) as a code block. So that I can deal with the code file separately.

This request may similar to Support embedding plain text files or Allow reading & writing .txt files as well as .md. But my request does not contain editing code, just embed them like images and videos.


Would love this feature

1 Like

I’d love to see the ability to

  1. Open .txt, .py, .conf, etc and have them automatically display as a full-page code block.
  2. Be able to embed these files in a note, displayed as a code block.

I’m a network engineer, so I’d mostly be working with Juniper and Cisco config files as well as some python.


Like this.