Syntax highlighting for code blocks

I use Dynalist to store code snippets and notes about code. Currently, a code block like this:

```fun add(x: Int, y: Int): Int {
    return x + y

add(2, 4) // 6```

Is displayed like this:


My preferred scenario would be to support language names like in MarkDown and have this:

fun add(x: Int, y: Int): Int {
    return x + y

add(2, 4) // 6

Look a little more like this:



I always wonder why this is forgotten, I mean this is build by developers right?
We could use a bit more developers love :slight_smile:


+1, need code highlighting very much.

1 Like

How do you get that code block to work? I can’t even get that to work.

1 Like

Look in your keymap: :slightly_smiling_face:

It is a weird shortcut for non english keyboard. You could just type two times `` as well.

Code highlighting has now arrived, and it’s great, but the back-tick character really is inaccessible on non-English keyboards. I’d welcome an option to customize a Dynalist keyboard shortcut that would insert three back-ticks that are now needed for multi-line code blocks. As it is, I have set up an AutoHotKey keyboard shortcut on Windows to insert the three back-ticks for me.

In my humble opinion, this responsibility doesn’t belong to the program but the OS.

I’m a US International keyboard layout user which has the ‘inaccessible’ behaviour I think you might be referring to. Simply pressing “`” (top left most character right under the escape button for me) followed by a space for one single back tick or three presses followed by a space for three has always worked perfectly for me.

Your AHK solution sounds perfect and like the perfect way and place to solve an issue that you don’t have with the app but with the OS you’re running the app on.

Well, I would still welcome the opportunity to set up my own keyboard shortcut for inserting three back-ticks, just like it’s possible to set up your own keyboard shortcuts for many other things in Dynalist, such as for inserting the bold or italic markdown – or a single back-tick!

But this is brand-new Dynalist functionality, just introduced a few days ago, so perhaps the option to set up a customized keyboard shortcut for inserting three back-ticks will be added to Dynalist a bit later on. :slightly_smiling_face:


+1 i need a shortcut too. thanks.

1 Like

I’d like to give my thanks and appreciation to @Shida and @Erica. I really appreciate your hard work making this feature happen :smiling_face_with_three_hearts:. Being a developer with bad memory, I rely on google and a code snippet manager. I already had a ton of snippets in Dynalist but now with code highlighting it’s twice the fun using it!


@Shida There is no way edit code block as far as I can tell.

If I paste a code block, I am not able to add new lines to it. It just jumps to another bullet-point.

@Gajus_Kuizinas some good ppl told me here that it’s actually possible: ctrl-shift-enter makes new line without creating new node