Open code files of various types with syntax highlighting

Use case or problem

Often, I want to quickly check on what I did in my code or copy and paste it to my notes. Now, every time I do this, it opens my standard editor, which is always a hassle. I just want to have it all in one place. It just doesn’t fit my habit.

Proposed solution

The solution is to have a text editor, with syntax highlighting dependent on the file type.
This also has the benefit, that it can be previewed via a link in my notes.

Probably solved by this plugin, it just embed code as attachments and hightlight it. Y-jiji/code-embed