Show line numbers in a Code-Block and be able to specify the line number it starts from

Offering CodeBlock line number feature from CodiMD (a flavour of Markdown - The free Open Source version of HackMD) would be nice.

The usecase is straigth forward:
If you want to show line numbers in the Code-Block of your document and to be able to specify the line number it starts from.
image
See also: https://codimd.web.cern.ch/features?both#Code-Block

Then type = after specifying the code block languagues. Also, you can specify the start line number. Like below, the line number starts from 101:

image

18 Likes

Sounds good. This would be very useful for tutorials/explanations on Publish.

1 Like

Good feature!

+1 from me

1 Like

great feature, looking for this

Unfortunately still looking for this!!

This feature is now available by a plugin ( HK Code Block Obsidian plugin developed by Heekang Park).
The plugin is not yet published in the official Obsi-store for external plugins, so you’ve got to install it manually, which is no big deal.

Thx a lot to Heekang Park

Source: GitHub - HeekangPark/obsidian-hk-code-block: Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
image

image

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.