How to Add Line Numbers to Code Blocks in Notion

0 Comments
Editor Ratings:
User Ratings:
[Total: 2 Average: 4.5]




This is a quick tutorial to explain how to add line numbers to code blocks in Notion. Notion Boost is a free and open-source Chrome extension that lets you tweak the UI of Notion, and one of the tweak it supports is addign line numbers to code blocks. By default, Notion pages don’t have line numbers, but if you use this add-on then it will add line numbers to all the code blocks in a click.

If you use Notion very much for personal use or work, then you should know this that it doesn’t show line numbers in the code blocks. And not having line numbers in some piece of code will make it look like incomplete. Unfortunately there is no way in Notion to enable line numbers. And that’s where the add-on I have mentioned here comes in.

Using Notion Boost, you can quickly enable line number in all code blocks in just a click. However, do note that it only adds line numbers for you. If you have a current page shared with others, then line numbers won’t show there. Unless of course the person on the other end using the same extension.

How to Add Line Numbers to Code Blocks in Notion

How to Add Line Numbers to Code Blocks in Notion?

Go to the Chrome web store and then simply install Notion Boost extension. There is no registration or sign up required in order to make it work. Actually this extension is a collection of useful utility for making Notion more productive by tweaking some of its UI elements. And one of those tweak is line numbers.

Notion Boost UI

Open a Notion page that has some code blocks.

Notion Page with Code Block

After that, you click on the extension’s icon and then slide the switch next to “Show code line numbers”. As you do that, it will automatically add line numbers to the entire code block. You can see that in the screenshot below.

Line Numbers Added

This is it. In this way, you can use this simple Chrome extension to add line numbers to code blocks on Notion. It is very simple and straightforward and works in a click. Apart from enabling line numbers, you can enable some other tweaks which are available in the add-on to make Notion better for yourself.

Final thoughts:

In my honest opinion, code with no line numbers looks ugly. If some online tool or service is providing code formatting options, then they must include code line numbers. I don’t know why Notion’s code block is missing line numbers, but I am glad then you can enable them one way or the other. Just use the extension I have mentioned and add line numbers to all the code blocks on all the Notion pages.

Editor Ratings:
User Ratings:
[Total: 2 Average: 4.5]
Free/Paid: Free

Leave A Reply

 

Get 100 GB FREE

Provide details to get this offer