Wish add the code block by using /

shortcut can make our writing quickly, but people could not remember those mounts of shortcuts. The most easy-use way is just add the function by using the /, like “/code”. Hope the official can add it.

Just in case you did not know, you can quickly add code by using ``` . so something like:


Logseq will auto complete the ```. THink this might be quicker than /code.

1 Like

A shortcut for code block alread exists as part of the advanced commands along with other options for admonition blocks.
You can invoke it by typing <src

However, I agree with the above comment that typing ``` with autocomplete is probably faster than <s + enter. The documentation definitely should make this more apparent since this is not the first time someone ask about this.

In your config.edn, you can add this under :command

            ["python" [[:editor/input "```python\n\n```" {:backward-pos 4}]]]

It will allow you to type /python to create a code snippet for python

1 Like

i didn’t realized it till today. Thanks a lot!